[XSL-LIST Mailing List Archive Home]
[xsl] Dynamic DOCTYPE inclusion applying XSLT on doc hierarchy
Subject: [xsl] Dynamic DOCTYPE inclusion applying XSLT on doc hierarchy|
From: Yves Forkl <Yves.Forkl@xxxxxxx>
Date: Wed, 05 Jun 2002 16:35:57 +0200
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
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
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?
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list