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 |
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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Re: RE: accessing node[$posit, spiders frommars | Thread | Re: [xsl] Dynamic DOCTYPE inclusion, Mike Brown |
[xsl] Re: RE: accessing node[$posit, Dimitre Novatchev | Date | [xsl] Translating Arrays into HTML, Rajput, Ashish S |
Month |