This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: feature request
At 09:57 AM 5/16/2000 +0100, David Carlisle wrote:
>... I would still argue that conceptually entities are by design
>distinct from the document structure, they allow an author to split up
>the file as he or she pleases, without having any effect on the logical
>document.
I believe that's the point of view espoused by the XML 1.0 Recommendation,
too. XML 1.0 has two big sections devoted to "what's in a document":
Sections 3 (Logical Structures) and 4 (Physical Structures). Sec. 4 is
pretty much exclusively to do with entities (declaring and referencing),
which are mentioned in Sec. 3 only in passing.
Given that XML 1.0 defines the behavior of parsers, including the
replacement of general/parsed entity references by whatever it is they
represent, I really don't understand how someone can complain because a
downstream application like XSLT fails to provide access to the unexpanded
reference. I mean, I can understand why it's frustrating -- I just can't
see that it makes logical sense to want (let alone expect) it to be
otherwise. When I'm stuck in rush-hour traffic, I always am frustrated by
the failure of other cars to be somewhere other than in my way; after all,
they honor that desire when I'm sitting in the driveway, so what's the
problem?
Now, unparsed entities are a whole other kettle of fish. But I can get at
them all right, via their URIs. But general/parsed entities? The whole
point of such an entity is that its "meaning" consists entirely of its
replacement value.
Dave Pawson's original request (and Bob DuCharme's followup), as I
understood it, was not about getting at the entity reference in the source
tree -- rather about creating an entity declaration in the result. That,
too, is another kettle of fish. It's not too hard to imagine an XSLT
element like:
<xsl:entity name="x"
replacement-text="whatever, including *escaped* ent refs"
system-id="uri" public-id="publicID"/>
Maybe as a child of the (otherwise typically empty) xsl:output element....
<relurk/>
================================================================
John E. Simpson | "I hate it when my foot falls asleep
http://www.flixml.org | during the day because that means it's
simpson@polaris.net | going to be up all night." (Steven Wright)
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list