xsl-list
[Top] [All Lists]

RE: Re: Getting the value of an entity

2002-09-02 15:37:03
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(_dot_)H(_dot_)Kay(_at_)ntlworld(_dot_)com
work: Michael(_dot_)Kay(_at_)softwareag(_dot_)com 


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



<Prev in Thread] Current Thread [Next in Thread>