FW: request, unparsed-entity-references

I'm copying this back to the public list (Christopher, sorry about the
bureaucracy, but we make a commitment to resolve all public comments on
the specs, so the dialogue has to be archived).

Michael Kay

-----Original Message-----
From: Christopher G D Tipper [mailto:chris.tipper@tiscali.co.uk] 
Sent: 17 February 2004 23:11
To: Michael Kay
Subject: Re: request, unparsed-entity-references


Its looks like a solution: I thought mine was more elegant. I frequently
need to pass through character entities without parsing them, and with
character maps it looks like encoding is still going to be a pain. This
is one of those irritants in my work that just won't go away. I think
this is probably because (as is becoming apparent to me the further I
delve into DTDs) that entities are an overloaded mechanism. If every
parser understood Unicode, and all those Unicode characters had unique
names, I think a lot of people would be able to get on with their work
without this niggling issue cropping up time and again.

Christopher
--------------------------------o00o--------------------------------
  "Since light travels faster than sound, isn't that why 
   some people appear bright until you hear them speak" 
                                          - Steve Wright
----- Original Message ----- 
From: "Michael Kay" <mhk@mhk.me.uk>
To: "'Christopher G D Tipper'" <chris.tipper@tiscali.co.uk>;
<public-qt-comments@w3.org>
Sent: Tuesday, February 17, 2004 10:32 PM
Subject: RE: request, unparsed-entity-references


> As David Carlisle pointed out, you've unfortunately got your 
> terminology
> wrong: you are in fact referring to parsed entity references rather
than
> unparsed entities.
> 
> A major reason that we added character maps to XSLT 2.0 was to provide

> a solution to this kind of difficulty. It's not a completely clean 
> solution; the data model knows nothing about parsed entities or entity

> references, which makes a clean solution very difficult. What 
> character maps allow you to do, however, is to replace every "$" sign 
> in the result tree with the entity reference "&dollar;" in the 
> serialized output.
> 
> I would be grateful if you could take a look at the xsl:character-map 
> facility in XSLT 2.0 and confirm whether it meets your requirements. 
> If it does, this will enable us to close this comment without adding 
> it to the long agenda of the XSL Working Group.
> 
> Regards,
> 
> Michael Kay
> 
> > -----Original Message-----
> > From: public-qt-comments-request@w3.org
> > [mailto:public-qt-comments-request@w3.org] On Behalf Of 
> > Christopher G D Tipper
> > Sent: 16 February 2004 17:52
> > To: public-qt-comments@w3.org
> > Subject: request, unparsed-entity-references
> > 
> > 
> > 
> > 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 Tuesday, 17 February 2004 19:24:10 UTC