GeeCON Prague 2014*
The moose likes XML and Related Technologies and the fly likes template matching problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "template matching problem" Watch "template matching problem" New topic
Author

template matching problem

shankar vembu
Ranch Hand

Joined: May 10, 2001
Posts: 309
Hi,
This seems to be a simple problem at first glance, but i somehow got stuck and still trying...
I have a template that transforms the contents in a <table>....</table> tag.

Now I have an xml file

I import the above template(xsl file) in my main xsl file to use the table template.
Now how do I apply this template. I am currently at the table element and gotto apply the table template. This wont work cos the table template matches the table tag and since I am already at the table tag, I can only process the child elements of the table tag. I am not supposed to change the imported template and my xml structure is also as defined above. I hope I have explained the problem clearly.
Regards,
Shankar.
shankar vembu
Ranch Hand

Joined: May 10, 2001
Posts: 309
I forgot to stress that I am the table tag currently. So I need to call the template while the context node is table tag.
shankar.
Mapraputa Is
Leverager of our synergies
Sheriff

Joined: Aug 26, 2000
Posts: 10065
<xsl:template match="table">
..... all transformations go here....
<xsl:apply-templates/>
</xsl:template>
should work...


Uncontrolled vocabularies
"I try my best to make *all* my posts nice, even when I feel upset" -- Philippe Maquet
 
GeeCON Prague 2014
 
subject: template matching problem