[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Create XML
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@xxxxxxxxxxxxx] > Sent: 17 April 2008 10:33 > To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx > Subject: 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|