
August 11th, 2003, 11:56 AM
|
|
Contributing User
|
|
Join Date: Sep 2001
Location: NJ
Posts: 428
  
Time spent in forums: 11 h 34 m 8 sec
Reputation Power: 10
|
|
|
xsl transformation of element yeilds entire node set
My XML document is a little bit more complicated than this example but the principle remains the same. Lets say I have a XML doc defined as follows
PHP Code:
<cds>
<cd>
<artist></artist>
<title></title>
</cd>
<cd>
<artist></artist>
<title></title>
</cd>
...
...
</cds>
Ok, now using Microsofts XMLDOM object I'll get a "cd" element object. What i'm trying to do is mearly transform the cd object, however when I do this I'm getting my entire set of CD's as if i had called "transformNode" on the documentelement. Is it possible to just transform an element and not the entire document? My xsl doc would look something like this :
PHP Code:
<?xml version="1.0" encoding="iso-88859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl=http://www.w3.org/1999/XSL/Transform">
<xsl:template match="cd">
<b><xsl:value-of select="Artist"/></b>
</xsl:template>
</xsl:stylesheet>
Does this make sense? And is what I wish to do possible?
|