[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Supressing entity expansion during XSLT transform
At 2008-01-11 10:29 +0530, Mukul Gandhi wrote:
[1] I want to write a transform which prevents entity expansion. The XPath data model on which XSLT is built does not represent entity references so that any present in the input source tree cannot be preserved for serialization in the output tree. Since the result tree is based on the XPath data model, one cannot represent an entity reference in the result tree as a data model abstraction. If you want to create entity references in the result file using XSLT 2.0, you can play with serialization using xsl:output-character and compose entity references, but since you don't know where the entity references were in the source tree, you won't know where to compose them in the output serialization. For e.g. the output of transform should be (this is an identity transform): That is because that is the information found in the source tree. The XML processor in the XSLT processor has already resolved all aspects of syntax and has built the XPath node tree with the information found in the source file (but not the syntax found in the source file). Constructs such as entity references and CDATA sections are merely aspects of syntax, not of information. But I want the output as specified in [1] above. Using a language other than XSLT. I believe the DOM supports entity references. I can use XSLT 2.0. Not for this problem you can't. I hope this helps. . . . . . . . . . . . . Ken -- Comprehensive in-depth XSLT2/XSL-FO1.1 classes: Austin TX,Jan-2008 World-wide corporate, govt. & user group XML, XSL and UBL training RSS feeds: publicly-available developer resources and training G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (F:-0995) Male Cancer Awareness Nov'07 http://www.CraneSoftwrights.com/s/bc Legal business disclaimers: http://www.CraneSoftwrights.com/legal
|
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
|