Re: [xsl] Dynamic DTD declaration in output

Subject: Re: [xsl] Dynamic DTD declaration in output
From: "Trevor Nicholls trevor@xxxxxxxxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 15 May 2019 15:14:57 -0000
Well you learn something every day. I have used result-document in the
POST-processor stylesheet to split the document apart but I had absolutely
no idea that - without an href - it could be used to define the primary
output. It works just the way I needed it to.


Thank you very much





From: Michael Kay mike@xxxxxxxxxxxx
Sent: Wednesday, 15 May 2019 19:07
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re: [xsl] Dynamic DTD declaration in output


In XSLT 2.0 you can do:


<xsl:template match="/">

  <xsl:result-document doctype-system="{$DefaultDTDPath}" method="xml"





Michael Kay


On 15 May 2019, at 06:45, Trevor Nicholls trevor@xxxxxxxxxxxxxxxxxx
<mailto:trevor@xxxxxxxxxxxxxxxxxx>  <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx
<mailto:xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> > wrote:




I've got a simple stylesheet which is executed as a pre-process when XML
documents are loaded into FrameMaker. At the moment the stylesheet includes
the line


    <xsl:output doctype-system="/path/to/docs.dtd" method="xml"
encoding="UTF-8" />


Because this stylesheet will be used by different users in several different
contexts, it would be brilliant if the path to the DTD could be
parameterised. I know the following is invalid but the purpose of this post
is to ask if there is any way of engineering an equivalent:


    <xsl:param name="DefaultDTDPath" />

    <xsl:output doctype-system="{$DefaultDTDPath}" method="xml"
encoding="UTF-8" />


XSL version has to be 1.0 or 2.0.





 <> XSL-List info and archive

EasyUnsubscribe <>  (by


XSL-List info and archive <>  

EasyUnsubscribe <>  (by
email <> ) 

Current Thread