[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
RE: [xsl] XML reformatting
RE: [xsl] XML reformatting
Subject: RE: [xsl] XML reformatting <xsl:element & <xsl:for-each
From: Jarno.Elovirta@xxxxxxxxx
Date: Tue, 7 Jan 2003 16:25:53 +0200
Hi,
> I have an xml file below that needs to be transformed before I can use
> it, the problem is that in the <Table> section there may be more
> parameters later on, this file is coming from a database.
>
> I'm trying to use the <xsl:element> in the template for the <Table>
> section and loop through all the child nodes of <Table> to put them in
> the output xml, but It keeps saying that the element name is not a
> QName, How can I accomplish this???
>
> I'm also getting Odd errors about <xsl:text>, 'Unexpected Child'.
>
> Must say thanks to Joerg Heinicke for his insight on my previous
> question, had spent ages on trying to get that working
> yesterday, seems
> so simple now :), hindsight :)
>
>
>
> Xslt:
> <xsl:template match="Table">
> <xsl:for-each select="*">
> <xsl:text>
> <xsl:value-of select="current()/text()"/>
> </xsl:text>
xsl:text can only have character data children. If you don't need the whitespace, just remove the xsl:text element.
> <xsl:element name="name()">
The generated element name would be "name()", which isn't a QName. Use AVTs, i.e.
<xsl:element name="{name()}">
Cheers,
Jarno - Grendel: End of Ages (Arzt+Pfusch Japscat Remix)
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread
- RE: [xsl] XML reformatting <xsl:element & <xsl:for-each
- Jarno . Elovirta - Tue, 7 Jan 2003 16:25:53 +0200 <=
<- Previous Index Next ->
RE: [xsl] creating a string after c, jfi
Thread
[xsl] Number of times apply-templat, Patel, Viral
RE: [xsl] disable-output-escaping=", Andrew Milkowski
Date
Re: [xsl] in-document references, Jeni Tennison
Month
Keywords
Subject: RE: [xsl] XML reformatting <xsl:element & <xsl:for-each From: Jarno.Elovirta@xxxxxxxxx Date: Tue, 7 Jan 2003 16:25:53 +0200 |
Hi, > I have an xml file below that needs to be transformed before I can use > it, the problem is that in the <Table> section there may be more > parameters later on, this file is coming from a database. > > I'm trying to use the <xsl:element> in the template for the <Table> > section and loop through all the child nodes of <Table> to put them in > the output xml, but It keeps saying that the element name is not a > QName, How can I accomplish this??? > > I'm also getting Odd errors about <xsl:text>, 'Unexpected Child'. > > Must say thanks to Joerg Heinicke for his insight on my previous > question, had spent ages on trying to get that working > yesterday, seems > so simple now :), hindsight :) > > > > Xslt: > <xsl:template match="Table"> > <xsl:for-each select="*"> > <xsl:text> > <xsl:value-of select="current()/text()"/> > </xsl:text> xsl:text can only have character data children. If you don't need the whitespace, just remove the xsl:text element. > <xsl:element name="name()"> The generated element name would be "name()", which isn't a QName. Use AVTs, i.e. <xsl:element name="{name()}"> Cheers, Jarno - Grendel: End of Ages (Arzt+Pfusch Japscat Remix) XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] creating a string after c, jfi | Thread | [xsl] Number of times apply-templat, Patel, Viral |
RE: [xsl] disable-output-escaping=", Andrew Milkowski | Date | Re: [xsl] in-document references, Jeni Tennison |
Month |
Keywords