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

XSLT and XInclude?

Subject: XSLT and XInclude?
From: Dan Vint <dvint@xxxxxxxxx>
Date: Sat, 21 Mar 2009 13:35:10 -0400
 XSLT and XInclude?
I've come across some documents that are using XInclude to fragment a larger tech manual. I've got the basic stylesheet working that reads the document name from the href and then opens it with the doc() function.

In this particular case, I'm able to process the content properly as the included document has a regular structure that I can process directly. I got to thinking though that I might need to process these included files within the context of their use/placement in the referencing document.

I would like to somehow pass the context in the parent document to the doc function and possibly the current template mode. Any ideas on how to do this? I'd also like to process it in one pass. One thought was to process the parent document and flatten the references, but that would require at least 2 passes to get the job done.

One area I defiantly got into trouble with my current success is in regards to the namespace definitions. These included documents have no use outside the parent document; so I guess this error hasn't been found because the individual file was not edited without the parent. Anyway, there was some change tracking markup added via some add/delete elements in a different namespace. Within the parent the namespace was defined, but the included file didn't have the declaration. When this file was passed to the doc function it errored out because the namespace wasn't defined in the included file.

I fixed this problem by correcting the included file, but if I could have passed the context (in this case the namespace information) I wouldn't have had a problem.

..dan
---------------------------------------------------------------------------
Danny Vint

Panoramic Photography
http://www.dvint.com

voice: 502-749-6179

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.