[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Well-formed locally, not well-formed server-side

Subject: Re: Well-formed locally, not well-formed server-side
From: Anode <anode@xxxxxxxxxxxx>
Date: Thu, 30 Jan 2003 07:20:08 -0500
xsl output method ssl
> Show us the XML and XSL.
XML:
<?xml version='1.0' encoding='utf-8'?>
<page name = "What is SSL?">
<section>
<para>
SSL or <emph2>Secure Sockets Layer</emph2> is an internet protocol to allow
for encrypted transmission between a browser and an internet server.
Without getting too technical, this means that any data the browser sends
through an SSL connection is scrambled immediately after leaving the browser
and unscrambled immediately prior to being received by the server used to
handle or store the data.  In between, the information is safe from prying
eyes listening in.
</para><para>
One of the great things about using SSL is that neither the on-page elements
nor the script receiving the data need to know that it was secured in
transit. You can trigger SSL encryption by using a URL that begins with
<emph2>https://</emph2>  instead of <emph2>http://</emph2> as is standard.
</para>
</section>
<section name = "SSL Certificates">
<para>
So far we've just discussed the technology of SSL but there is another
element involved.  Another issue that concerned the designers of SSL was
whether the encrypted information was going to the web site you intended it
to go to.  To ensure this, SSL certificates were introduced.
</para>
SSL certificates are small files you associate with your web site issued by
trusted third-parties called <emph2>Certification Authorities</emph2>(CAs.)
While anyone is free to issue a certificate, web browsers have a list of
trusted CAs.  If the certificate involved in a potential SSL transaction is
not in the browser's "trusted" list, the browser will inform the user of
that fact.  This is more than enough to scare customers away, so this
article  will only discuss SSL in the context of purchasing a certificate
from a CA. 
</para></section>
</page>

XSL:
<?xml version='1.0' encoding='utf-8'?>

<xsl:stylesheet version='1.0'
xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>

<xsl:output method='html' cdata-section-elements = "cdata" version='1.0'
encoding='iso-8859-1' indent='no'/>
    <xsl:template match = "page">
        <xsl:if test = "@name">
        <h1>
            <xsl:value-of select = "@name"/>
        </h1>
        </xsl:if>
        <xsl:apply-templates />
    </xsl:template>
    <xsl:template match = "section">
        <xsl:if test = "@name">
            <h2>

            <xsl:value-of select = "@name" />
        </h2>
    </xsl:if>
        <xsl:apply-templates />
    </xsl:template>
    <xsl:template match = "para">
        <p>
                    <xsl:apply-templates />

        </p>
    </xsl:template>
    <xsl:template match = "subhead">
        <h3>
                    <xsl:apply-templates />

        </h3>
    </xsl:template>
        <xsl:template match = "list">
        <ul>
            
        <xsl:if test = "@name">
<strong>

            <xsl:value-of select = "@name"/>

            </strong>
            </xsl:if>
                <xsl:apply-templates />

        </ul>
    </xsl:template>
    <xsl:template match = "listitem">
        <li><xsl:apply-templates /></li>
    </xsl:template>
    <xsl:template match = "emph">
        <em><xsl:apply-templates /></em>
    </xsl:template>
    <xsl:template match = "emph2">
        <strong><xsl:apply-templates /></strong>
    </xsl:template>
        <xsl:template match = "offset">
        <blockquote><xsl:apply-templates /></blockquote>
    </xsl:template>
    <xsl:template match = "escape[@inline]">
    
            <xsl:if test = "@language">
    
        <strong><xsl:value-of select = "@language" />:</strong>
        </xsl:if>
    <pre><xsl:apply-templates /></pre>
        </xsl:template>
    <xsl:template match = "escape">
    <p>
            <xsl:if test = "@language">
    
        <strong><xsl:value-of select = "@language" />:</strong>
        </xsl:if>
    <pre><xsl:apply-templates /></pre>
</p>        
</xsl:template>

    <xsl:template match = "link">
        <a>
   <xsl:attribute name="href">
    <xsl:value-of select = "@href"/>
    </xsl:attribute>
   <xsl:attribute name="title">
    <xsl:value-of select = "@title"/>
    </xsl:attribute>

    <xsl:if test = "@newwin">
       <xsl:attribute name="target">
        <xsl:text>_blank</xsl:text>
        </xsl:attribute>
    </xsl:if>
   <xsl:value-of select="."/>
</a>
        <xsl:apply-templates select = "infocart"/>

    </xsl:template>
    <xsl:template match = "infocart">
        <img src = "images/infocart.gif" width = "16" height = "16" border =
"0">
        <xsl:attribute name = "onClick">
        <xsl:text>AddToInfoCart(</xsl:text>
        <xsl:value-of select = "../@title"/>
        <xsl:text>,</xsl:text>
        <xsl:value-of select = "../@href"/>
        <xsl:text>)</xsl:text>
        </xsl:attribute>
        </img>
    </xsl:template>
    <xsl:template match = "graphic">
                <xsl:if test = "@caption">
        <strong><xsl:value-of select = "@caption"/>:</strong><br/>
        </xsl:if>

        <img>
        <xsl:attribute name = "src">
        <xsl:value-of select = "@source" />
        </xsl:attribute>
                <xsl:attribute name = "width">
        <xsl:value-of select = "@width" />
        </xsl:attribute>
        <xsl:attribute name = "height">
        <xsl:value-of select = "@height" />
        </xsl:attribute>
            <xsl:attribute name = "border">
                <xsl:text>0</xsl:text>
            </xsl:attribute>
        </img>
    </xsl:template>
    <xsl:template match = "skip">
    <a>
    <xsl:attribute name = "name">
    <xsl:value-of select = "@name" />
    </xsl:attribute>
    </a>
    </xsl:template>
    
    </xsl:stylesheet>


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.