[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

templates around templates.

Subject: templates around templates.
From: Jay Marvin <jay.marvin@xxxxxxxxxxxxxx>
Date: Tue, 25 Apr 2000 17:37:26 -0700
request templates
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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.