I suspect that what you are looking for is the <xsl:element> instruction.
For example if $n holds the string "Article", and $a is "author", you can
write
<xsl:element name="{$n}">
<xsl:attribute name="id">abc</xsl:attribute>
<xsl:element name="{$a}">
<xsl:attribute name="type">string</xsl:attribute>
</xsl:element>
</xsl:element>
Michael Kay
http://www.saxonica.com/
-----Original Message-----
From: IZASKUN GUTIERREZ GUTIERREZ
[mailto:igutierrez027(_at_)ikasle(_dot_)ehu(_dot_)es]
Sent: 17 April 2008 10:33
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] Create XML
Hello everybody!
I am doing stylesheets with XSLT 2.0 and I execute they with
JAXP (Saxon).
Depends on the result of the templates, I need to write XML
elements, for
example, in one File:
<Article id="abc">
<author type="string">Joan Smith</author>
</Article>
Can I do this with JAXP or Saxon? What packages I need to use?
thank you, regards
Izaskun
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail:
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--