W3C home > Mailing lists > Public > public-qt-comments@w3.org > February 2004

request, unparsed-entity-references

From: Christopher G D Tipper <chris.tipper@tiscali.co.uk>
Date: Mon, 16 Feb 2004 17:51:53 -0000
Message-ID: <001701c3f4b5$9424bf40$90ec403e@tigger>
To: <public-qt-comments@w3.org>

XSLT 2.0 recommendation states "XSLT 2.0 provides no facility to construct unparsed entities within a tree"

I think this is a mistake.

Problem Summary:

When transforming using intermediate formats I frequently find that entity references are resolved too early. One solution would be to use a catalog to switch entity sets dynamically, but don't know of such on my platform.

Scenario, Problem details

My situation is as follows:

I have a TeX based parsing package which has problems with the '$' character. So I use the &dollar; entity, but then I find that HTML output doesn't resolve this entity and I find the literal &dollar; in my HTML output.

To work around this problem I use a <dollar/> element and have to put the following in my stylesheet:

  <xsl:template match="dollar">$</xsl:template>

This is a problem for every stylesheet that starts from this source, and I find the process both confusing and inelegant.

Solution, Request

What I would like is a new parameter, so that I could write the following, which would remove a lot of headaches transforming between multiple output DTDs. 

  <xsl:template match="text()">
     <xsl:value-of select="." unparsed-entity-references="yes"/>
  </xsl:template>

So much better with 'unparsed-entity-references' at the head of the stylesheet. Then I can use <!ENTITY dollar "&#x0024;"> <!-- DOLLAR SIGN -->
in my local DTD, and pass on the entity reference to intermediate DTDs.

Best wishes,
Christopher Tipper
--------------------------------o00o--------------------------------
  “Since light travels faster than sound, isn’t that why 
   some people appear bright until you hear them speak” 
                                          — Steve Wright
Received on Monday, 16 February 2004 17:12:51 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:14:05 GMT