Good day to you all,

Here is what I am trying to do:
I am using an XSL transformation to change my input.xml in output.xml.
output.xml contains a set of rearranged tags from input.xml
One of the tag in input.xml is <id>value</id>
I would like the xsl to generate the output filename to be value.xml.

Basically:
Input.xml (contains tag <id>xxx</id>) => transformation.xsl => output.xml (output = xxx)

Thanks in advance for your help and advice

There is no standard way of doing what you want to do using an XSLT 1.0 processor. You can use the EXSLT document function (http://www.exslt.org/exsl/elements/document/index.html) or if you have an XSLT 2.0 processor such as Saxon you can use the <xsl:result-document> element.

Thank you fpmurphy for your answer,

Allow me to insist...

Can this EXSLT function be used in my 1.0 xsl transformation?
if yes, how do I implement it?

If I go for 2.0 xsl:result-document, how exactly do I do that.

Thanks a lot for your help on this.

Can this EXSLT function be used in my 1.0 xsl transformation? if yes, how do I implement it?

Go to the URL that I included in my reply, read the documentation and follow the instructions therein.

If I go for 2.0 xsl:result-document, how exactly do I do that.

Use any XSLT 2.0 processor. A popular (and good) processor is the Saxon 8.X or 9.X processor (www.saxonica.com.)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.