Subject: RE: Fw: Root Node and apply-templates
From: "Avula, Raj" <ravula@xxxxxxxxxxx>
Date: Mon, 7 Apr 2003 10:56:21 -0700
|
Both of them should work. Which XSLT processor are you using??
PS:Check the typos in xsl for template name.
-----Original Message-----
From: Oscar [mailto:ocaraballo@xxxxxxxxxxxxx]
Sent: Monday, April 07, 2003 7:54 AM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Fw: Root Node and apply-templates
I dont know if this is a very simple question but im a bit confused:
I have this xml:
<?xml version="1.0" encoding="ISO-8859-1" ?><?xml:stylesheet type="text/xsl"
href="/BKM/BKMDesarrollo/admin/showSrchTemplate.xsl"?>
<ROOT CgiWebXcon="/cgi-bin/BKM/BKMDesarrollo/idccgi/X8102/ID25880"
idioma="admproperties_es_ES.xml" system="SAMP" >
<FIELDS>
<FIELD tipo="0" sname="DOCN" >BRS Assigned Accession Number</FIELD>
<FIELD tipo="0" sname="TI" >Title</FIELD>
<FIELD tipo="0" sname="TX" activated="true" >Texto</FIELD>
<FIELD tipo="0" sname="CR" activated="true" >Referencias</FIELD>
<FIELD tipo="0" sname="SHRT" activated="true" >DOCN</FIELD></FIELDS>
</ROOT>
and i do somethign like this:
<xsl:template match="/">
<xsl:apply-templates select="/ROOT/FIELDS/FIELD"/>
</xsl:temaplate>
<xsl:template match="FIELD">
display data
</xsl:template>
but this doesnt work, otherwise this code works:
<xsl:template match="/">
<xsl:call-template name="test"/>
</xsl:temaplate>
<xsl:template name="test">
<xsl:apply-templates select="/ROOT/FIELDS/FIELD"/>
</xsl:temaplate>
<xsl:template match="FIELD">
display data
</xsl:template>
why?
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
| Current Thread |
- Fw: Root Node and apply-templates
- Oscar - Mon, 7 Apr 2003 10:52:44 -0400 (EDT)
- Bix - Mon, 7 Apr 2003 11:20:46 -0400 (EDT)
- Michael Kay - Mon, 7 Apr 2003 14:42:56 -0400 (EDT)
- Oscar - Tue, 8 Apr 2003 03:19:25 -0400 (EDT)
- <Possible follow-ups>
- Avula, Raj - Mon, 7 Apr 2003 14:28:11 -0400 (EDT) <=
|
|