XSLT - reuisition

C

Cathy

Hi,

What does <requisition> do? Do I need to have xsl:apply-templates in
order for the parser to look for other templates's match attributes?

Thanks.
 
J

Joris Gillis

Hi,

Are you , by any chance, referring to http://www.xmlpitstop.com/Books/0764543946/004/00025/76/SampleChapter.aspx ?

I'll assume you are.

'requisition' is just an invented element.
It's there to demonstrate how you can generate an XML output.

<xsl:apply-templates/> must be called to evaluate the children of the context node ( i.c. 'order')
If it is not called, no children will be evaluated, even if there are templates defined in the document who would match these children.
Use the 'select' attribute to specify exactly which nodes (relative to the context node) are to be evaluated (when not simply all child nodes must be evaluated).
Note that the 'select' and 'match' attributes do not have to be equal characterwise.

e.g. this will work:

<xsl:apply-templates select="node[@a='b']"/>

<xsl:template match="node">
<xsl:value-of select="."/>
</xsl:template>

regards,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,241
Members
46,831
Latest member
RusselWill

Latest Threads

Top