Subject: RE: Re: Getting the value of an entity
From: "Michael Kay" <michael.h.kay@xxxxxxxxxxxx>
Date: Mon, 2 Sep 2002 23:37:03 +0100
|
> I still have a problem with the use of a xslt stylesheet and a
> xml document that include other xml subdocuments declared as
> unparsed entity.
>
> In the book "Structuring XML Documents" is recommended that
> when you want to include a subdocuments in a xml document you
> should the following scheme
> - First, declare a notantio for the XML documents
> <!NOTATION XML SYSTEM "http://www.w3.org/XML/">
> - Second, declare an NDATA entity for each subdocuments
> <!ENTITY chap01 SYSTEM "chap01.xml" NDATA XML>
> <!ENTITY chap02 SYSTEM "chap02.xml" NDATA XML>
> - Third, declare an element type (usually empty) with an
> ENTITY attribute to act as a placeholder for the subdocuments
> <!ELEMENT chapter-ptr EMPTY>
> <!ATTLIST chapter-ptr source ENTITY #REQUIRED>
Well, there are certainly people who like to do things this way,
especially people who have long years experience of SGML. For my part, I
*never* use entities of any kind to link together the parts of a
composite document. I simply use a URI in one document to point to the
other related documents, and use the XSLT stylesheet to assemble the
information I need using the document() function. I do it this way
because it gives me far more control over how the information is
assembled and how the relationships are managed.
Michael Kay
Software AG
home: Michael.H.Kay@xxxxxxxxxxxx
work: Michael.Kay@xxxxxxxxxxxxxx
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|