XML.com: XML From the Inside Out

XML.comWebServices.XML.comO'Reilly Networkoreilly.com
  Articles | Weblogs | Newsletter | Safari Bookshelf
advertisement

Article:
 Entity and Character References
Subject: Preserving Entities in XSLT 1.0
Date: 2005-10-04 03:11:41
From: JackParker

Is there any way to preserve the entities in XSLT 1.0? If the input document.xsl has & # 160; then, after an identity transform the XSLT processor always converts this to the copyright symbol. How can we leave it unchanged?

Previous Message Previous Message   Next Message No Next Message


Titles Only Titles Only Newest First
  • Preserving Entities in XSLT 1.0
    2005-10-04 05:05:19 Bob DuCharme [Reply]

    That's not an entity, it's a numeric character entity reference, but like an entity reference, the XML parser that hands the source document to the XSLT processor is required by the XML Recommendation to map it to the appropriate character of the result document in the result document's encoding if it can. (See the third paragraph of the article and the earlier column that it points to.)


    If you want to output non-keyboard characters as numeric character references, try an output encoding of "US-ASCII".


    Bob


Sponsored By:


Contact Us | Our Mission | Privacy Policy | Advertise With Us | | Submissions Guidelines
Copyright © 2008 O'Reilly Media, Inc. | (707) 827-7000 / (800) 998-9938