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

Dynamic DOCTYPE inclusion applying XSLT on doc hierarc

Subject: Dynamic DOCTYPE inclusion applying XSLT on doc hierarchy
From: Yves Forkl <Yves.Forkl@xxxxxxx>
Date: Wed, 05 Jun 2002 16:35:57 +0200
dynamic doctype
Hi,

I have a set of XML files organized in a book-chapter-section document
hierarchy. Each file is processed individually (but may include
another one of these files) using the same XSLT stylesheet to produce a
separate output file for each input file, running Xalan-J.

Consequently, I need to dynamically include the top-level file's
DOCTYPE declaration when processing each input file, as I'm defining
the entities required for file inclusion in the internal DTD subset.
(Besides that, my stylesheet seems to make Xalan-J require a DOCTYPE
declaration.)

I tried using the document() function inside the template that is
reading the input file's document element node, in order to include an
extra input file that only contained that DOCTYPE declaration and
entity definitions:

<xsl:apply-templates
select="document('toplevel-file-doctype_and_entities.xml')"/>

The problem, however, is that this makes XSLT processing start again
with the XSLT document root node ("/"), leading to an infinite loop.

Is there a way to read a DOCTYPE declaration from an extra input file
without moving back to the top of the source tree?

Does anybody have another idea how to process a hierarchy of
documents? Maybe by working with entities directly in the stylesheet
to "load" a sub-document?

  Yves

 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.