wood burning stoves 2.0
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

template matching problem

shankar vembu
Ranch Hand

Joined: May 10, 2001
Posts: 309
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.
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.
Mapraputa Is
Leverager of our synergies

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

Uncontrolled vocabularies
"I try my best to make *all* my posts nice, even when I feel upset" -- Philippe Maquet
I agree. Here's the link: http://aspose.com/file-tools
subject: template matching problem
It's not a secret anymore!