[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Multi-source documents: difference between document()

Subject: Multi-source documents: difference between document() and entities?
From: Randolph Kahle <randy.kahle@xxxxxxxxxxxxx>
Date: Tue, 27 Jan 2004 11:50:37 -0700
difference between documents
I am trying to determine the best way to manage the metadata related to an XSL transformation.

To create a document, I assemble parts from separate XML-formatted "topic" files. I currently use a master XML document and define entities:

<<<<<

<?xml version="1.0" encoding="iso-8859-1" ?>

<!DOCTYPE class
[
<!ENTITY pINTRODUCTION    SYSTEM  "topics/introduction.xml" >
<!ENTITY pOVERVIEW        SYSTEM  "topics/overview.xml" >
]>

<class>
    &pINTRODUCTION;
    &pOVERVIEW;
</class>

>>>>>

This entity-based approach allows me to clearly anchor all references to portions of the tree via "/", which is important when I add cross-reference links to my processing.

The other way I could do this is to use the document() function to read in an XML-formatted file that contains the class structure metadata, loop through that and read in each topic file with the document() function.

I prefer to externalize the metadata into a pure data-based XML file and use the document() function, but it is not clear to me how I would define a path to the different trees.

As I understand it, document() returns the root node of a tree and if I use the "/" path while processing a tree, I do *not* get the "root" above all document()-retrieved trees. What I get is the root of that specific XML file's tree.

My question is: How do I construct a path that will search all trees returned by the document() function?

-- Randy




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



Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.