This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Dynamic DOCTYPE inclusion applying XSLT on doc hierarchy


<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.
That shouldn't have happened. Processing should have aborted because
the XML was not well-formed. (You can't declare a DOCTYPE and then not have a document element). Apparently when this error was encountered,
your XSLT processor kept on going as if you had done document(''), which
means to use the stylesheet as the argument.
There is always the risk of infinite loop when using document():

<xsl:template match="/">
<!-- applies template on the root node of another.xml -->
<xsl:apply-templates select="document('another.xml')"/>
</xsl:template>

If your file only contains the DOCTYPE declaration, maybe XInclude will help. You can include text with it.

Joerg


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]