This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: Is there a way to output & apos ; instead of & # 34 ; in XML?
- To: <xsl-list at lists dot mulberrytech dot com>
- Subject: RE: [xsl] Is there a way to output & apos ; instead of & # 34 ; in XML?
- From: "Michael Kay" <mhkay at iclway dot co dot uk>
- Date: Wed, 14 Mar 2001 10:26:59 -0000
- Reply-To: xsl-list at lists dot mulberrytech dot com
> But if the input has
> '
> or
> "
> , the output changes them to
> '
> and
> "
> , which is not good. I'd like to preserve what was in the
> input.
No, there's no way to preserve what's in the input, when the two
representations are equivalent in the XPath data model. Just as you can't
preserve the spaces around an equals sign in attribute="value". Since all
XML applications shold treat the two as equivalent, the theory is that these
cosmetic variations do not need to be preserved.
Saxon gives you some control over the representation of non-ASCII characters
in the output (see the saxon:character-representation attribute) but that
won't help you in this case. You can always write your own serializer, but
even that won't tell you what the input representation was.
Mike Kay
Software AG
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list