Template is not invoked.

Reply

Join Date: Jan 2009
Posts: 3
Reputation: learningxslt is an unknown quantity at this point 
Solved Threads: 0
learningxslt learningxslt is offline Offline
Newbie Poster

Template is not invoked.

 
0
  #1
Jan 16th, 2009
Hi All,
I have a stylesheet with a identity transformation template and an element specific template. However, when I ran the below stlyesheet over a xml file, only identity transformation is invoked. My element specific template isn't.

There is a target namespace for the schema that defines the elements. I have specified in the stylesheet using xmlns attribute as below.

Can you please help.

Regards

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns="http://mynamespace">

<xsl:output method="xml" encoding="utf-8"/>

<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*|node()" />
</xsl:copy>
</xsl:template>

<xsl:template match="XYZ">
....
....
</xsl:template>

</xsl:stylesheet>
Reply With Quote Quick reply to this message  
Join Date: Oct 2008
Posts: 95
Reputation: fpmurphy is an unknown quantity at this point 
Solved Threads: 5
fpmurphy fpmurphy is offline Offline
Junior Poster in Training

Re: Template is not invoked.

 
0
  #2
Jan 16th, 2009
Can you please supply a sample XML file also.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC