Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Generate XML and XSD documents using one XSLT

Tags:

xml

schema

xslt

xsd

I want to do an XSL Transformation on an XML document so that my XSLT will generate a new XML document attached to an XSD document. I'm asking if it's possible to generate two different types of documents using only one XSLT.


1 Answers

XSLT 2.0 can create several result documents with a single transformation using xsl:result-document, see the spec https://www.w3.org/TR/xslt20/#creating-result-trees. Also some XSLT 1.0 processors support an extension like http://exslt.org/exsl/elements/document/index.html supported in libxslt/xsltproc or like http://xml.apache.org/xalan-j/extensionslib.html#redirect in Xalan.

like image 179
Martin Honnen Avatar answered Feb 21 '26 14:02

Martin Honnen



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!