Given the following XML, I want to use templates on Request and RequestLine.
RequestLine's are embedded in Request's. Using the XSL below, my template
for RequestLine doesn't get a complaint from Xalan1_0_1, or do anything at
all it seems.
I guess the RequestLine template is being overridden by the higher-level
Request template. What I'm trying to do is use the Request template to
place formatting around the entire request, and the RequestLine template to
place formatting around a line within Request.
The XML------------
<Conversation>
<Request>
<RequestLine>
request line 1
</RequestLine>
<RequestLine>
request line 2
</RequestLine>
</Request>
</Conversation>
--------- End XML
The XSL --------------
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl='http://www.w3.org/1999/XSL/Transform'
version="1.0">
<xsl:template match="RequestLine">
<I><xsl:value-of select="."/></I>
</xsl:template>
<xsl:template match="Request">
<P style="color:red"><xsl:value-of select="."/></P>
</xsl:template>
</xsl:stylesheet>
----------- End XSL
Obviously I'm new to XSL... Can someone help me out with the right XSL to do
this?
Thanks!
Jay
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|