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

Re: XSL Dominos

Subject: Re: XSL Dominos
From: David Carlisle <davidc@xxxxxxxxx>
Date: Fri, 28 May 2010 15:20:18 +0100
Re:  XSL Dominos
On 28/05/2010 15:09, Nick Leaton wrote:
In reverse order, on the fn: - good point, I'll remove them.

On the apply templates versus call, I've never been able to get my
head round the apply-templates bit, particular because of the need to
use a mode. I personally read apply-templates as, "something happens
here, but I don't know what" !!

Call templates makes it explicit as to what happens. My personal take
on that bit.


But as I say since it means you are not using the main control construct of the language, the program needs a lot more code (and is a lot less flexible, template application typically automaticaly recururses through element structure, whereas passing a message parameter you need to do it by hand 9and if the input isn't exactly as you expect it fails, as you've found)


On the problem I'm having, I have put in trace output, to push out $message at each stage.

value-of doesn't tell you what you need to know as it removes the structure


<foo><bar>hello</bar></foo> and "hello"  both have string value
"hello" but if they were in $message they would need very different paths.
<xsl:message select="$message"/>

would reveal more but still won't show you the difference between an element trade and a document node with element trade as child.

Try putting as="element(trade)" on xsl:param that you think should get trade elements (and similarly other xsl;param)


David




> It is output correctly, however, the value-of
selections from $message/ give the value, or don't give the value
depending on whether or not its the compound xsl or the single stage
xsl

Nick

________________________________________________________________________ The Numerical Algorithms Group Ltd is a company registered in England and Wales with company number 1249803. The registered office is: Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom.

This e-mail has been scanned for all viruses by Star. The service is
powered by MessageLabs. ________________________________________________________________________


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.