This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
xsl:template - matching template with the name which is not in XML/DOM
- To: XSL-List at mulberrytech dot com
- Subject: xsl:template - matching template with the name which is not in XML/DOM
- From: srirangababu thimmaiah <babuxsl at yahoo dot com>
- Date: Wed, 23 Aug 2000 21:52:04 -0700 (PDT)
- Reply-To: xsl-list at mulberrytech dot com
Hi
I have a ? regarding using of "apply-templates
match="name"
can "name" be anything, that means, it is not an
element of XML.
XML file
--------
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl"
href="testtemplate2.xsl"?>
<ADDRESS>
<NAME>
<FIRSTNAME>John</FIRSTNAME>
<LASTNAME>micheal</LASTNAME>
</NAME>
<CITY>mountain view</CITY>
<STATE>CA</STATE>
</ADDRESS>
XSL file
--------
<?xml version="1.0"?>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/TR/WD-xsl">
<xsl:template match="/">
<html>
<xsl:apply-templates select="CHECK"/> -- *
</html>
</xsl:template>
<xsl:template match="CHECK"> -- **
<title>
Hey man what are you doing
</title>
</xsl:template>
</xsl:stylesheet>
Question:
---------
1.when the xsl transformer checks for the root node,
then it looks in the stylesheet
for the match for root, if there it does the process
inside template.
2.can i say apply-templates select="CHECK" as in line
*.
Note: CHECK is not in the xml document so will not
be in the dom tree.
but can i just create a template for CHECK which is
not in dom tree and call that, will it be called
when coded as i have coded.
__________________________________________________
Do You Yahoo!?
Yahoo! Mail - Free email you can access from anywhere!
http://mail.yahoo.com/
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list