[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Understanding character handling

Subject: Re: Understanding character handling
From: Keith Visco <kvisco@xxxxxxxxx>
Date: Fri, 08 Jan 1999 12:43:48 -0500
visco worms
keshlam@xxxxxxxxxx wrote:

> User-created entities are a different kettle of worms. According to the DOM
> spec, a validating parser _can_ retain the fact that data was obtained via
> an entity reference -- but doesn't have to. In the former case, you know
> which entity was used and you can recreate the reference on output. In the
> latter approach, that information is lost. If this is important to you, use
> it as a guide in selecting parsers. (I'm not defending the fact that it was
> left open, just pointing out the hazard.)
> 


I do feel something should be done about this, if I am understading
everyone correctly. For example the xsl identity example given in the
xsl wd:

--- from XSL WD 19981216
<xsl:template match="*|@*|comment()|pi()|text()">
  <xsl:copy>
    <xsl:apply-templates select="*|@*|comment()|pi()|text()"/>
  </xsl:copy>
</xsl:template>
---

 will not produce a "true" identity of the following xml if the entity
references are expanded by the parser choosen for the xsl processor
implementation:

<my-element>
  &my-entity;
</my-element>

And different results  may occur depending on which processor you
choose, if the entity reference is lost in one, but not in the other.


And on to a related topic. I am in favor of the "xsl:entity-ref" that
another subscriber suggested. In which case I would be able to create
enities in my
xsl stylesheet that apply to the DTD of the resulting XML
transformation.

<xsl:entry-ref name="nbsp"/>

would give me my desired &nbsp; in the result document.

--Keith


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.