Click to See Complete Forum and Search --> : Well formed XML file


AyazSardar
September 17th, 2001, 05:58 AM
Can anyone tell me if it is possible to use this peace of XML code,
and how to use it:
xml:
<appl>b.m.w. <imagefile>bmwlogo.jpg</imagefile> 325i</appl>

What I want to present is this: b.m.w. [bmwlogo.jpg] 325i
When I use the
xsl:
<xsl:value-of select="appl/text()" />
statement i only get the first part of the <appl> tag (b.m.w.), how can i
get the second part of this tag?

Thanks

tyris
September 17th, 2001, 10:16 AM
it's sometime usefull to use attributes, inside a node

regards

Elise, XML learning girl :-)

Virtuality
September 18th, 2001, 04:08 AM
Until I pasted that XML into an editor, I wouldn't have thought it was valid, but it is.. I guess the text() function stops when it sees the next tag, in your case. Why don't you use multiple XSL statements? I'm not an expert in this area, just trying to be helpful :-)

richard z
September 19th, 2001, 01:35 PM
If you use <xsl:foreach select="app/*"><xsl:value-of/></xsl:foreach>, you will get b.m.w.bmwlogo.jpg 325i. I think next step will be if condition, but I just don't familiar with it.

By the way, I don't think your format is a good idea. :)

Regards.