|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: More entity confusion and my opinion on the right way
At 99/01/05 14:36 -0800, Andrew Bunner wrote:
> Wrong.
>
>   (space) gets translated to the space character, not to
That is because   is the space.
The value   is the non-breaking space.
An example is attached below (with manually modified HTML to prevent mail
readers from rendering; just change all occurrences of "< " to "<").
........... Ken
T:\FTEMP>type greeting.xml
<?xml version="1.0"?>
<?xml:stylesheet type="text/xsl" href="greeting.xsl"?>
<greeting><emphasis>Hello</emphasis> World!</greeting>
T:\FTEMP>type greeting.xsl
<?xml version='1.0'?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl"
xmlns="http://www.w3.org/TR/REC-html40"
result-ns="">
<xsl:template match="/"> <!--the framework of a complete HTML file-->
< html>
< head>
< title>Test< /title>
< /head>
< body>
< xsl:apply-templates/>
< /body>
< /html>
</xsl:template>
<xsl:template match="greeting">
< p><xsl:apply-templates/>< /p>
</xsl:template>
<xsl:template match="emphasis">
< b><xsl:apply-templates/>< /b>
</xsl:template>
</xsl:stylesheet>
<!--end of file-->
T:\FTEMP>call xsl greeting.xml greeting.xsl greeting.htm
T:\FTEMP>type greeting.htm
< !DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
< html>
< head>
< title>Test< /title>
< /head>
< body>
< p>
< b>Hello< /b> World!< /p>
< /body>
< /html>
T:\FTEMP>
--
G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx
Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/
Box 266, V: +1(613)489-0999
Kars, Ontario CANADA K0A-2E0 F: +1(613)489-0995
Training: http://www.CraneSoftwrights.com/s/schedule.htm
Resources: http://www.CraneSoftwrights.com/s/resources.htm
Shareware: http://www.CraneSoftwrights.com/s/shareware.htm
Next XSL Training (see training link): WWW8 - 1999-05-11
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








