This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: XSL special chars output prob.
- From: "Julian Reschke" <julian dot reschke at gmx dot de>
- To: <xsl-list at lists dot mulberrytech dot com>
- Date: Tue, 11 Jun 2002 11:11:04 +0200
- Subject: RE: [xsl] XSL special chars output prob.
- Reply-to: xsl-list at lists dot mulberrytech dot com
This is by design.
XML doesn't allow any control characters except TAB, NL and LF, and
therefore, you can't produce them with plain XSLT.
> -----Original Message-----
> From: owner-xsl-list@lists.mulberrytech.com
> [mailto:owner-xsl-list@lists.mulberrytech.com]On Behalf Of Thomas Brand
> Sent: Tuesday, June 11, 2002 10:58 AM
> To: xsl-list@lists.mulberrytech.com
> Subject: [xsl] XSL special chars output prob.
>
>
>
> hello there,
> i have a question concerning special character output.
>
> the goal is to transform a given xml document (not shown here) to a file,
> that has a strange header with special characters. if i view an example
> output file with a hex editor, i see 7F 0D 0A 17 00 04 01 etc.
>
> well, why not use &#x<here the two digits> in my xsl stylesheet i
> thought.
> this works well for the most characters, i.e. line feed (0A). the problem
> arises when trying to output �,  etc.
>
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <xsl:stylesheet version="1.0"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >
>
> <xsl:output method="text" encoding="ISO-8859-1"/>
> <xsl:template match="/">
> 1 @
> 2 &
> 3 

> 4 
> <!-- 5 �
> 6 
> 7 
> 7 
> -->
> </xsl:template>
> </xsl:stylesheet>
>
> in xml-spy, when trying to output �, it says "not
> well-formed. invalid
> unicode char.".
>
> did i made something wrong with encoding/output method etc.?
>
> how can i solve this problem? i'd like to leave out extension
> functions if
> possible.
>
> greets to all subscirbers
>
> Thomas Brand
>
>
>
> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list