|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Typing of parameters in XSLT 2.0
I was experimenting in Saxon 7.4 with a simple factorial example which
accepts an argument from the command line.
In the absence of an as attribute or a type-information attribute on the <xsl:param> element the stylesheet seemed to behave in XSLT 2.0 as it did in XSLT 1.0. That is convenient but I am not sure that I completely understand the XSLT 2.0 processor's behaviour. Let's say the command line was java -jar saxon7.jar ..... number=5. What type is the supplied parameter 5 in XSLT 2.0? I couldn't find a clear description in the spec. Is the supplied parameter a string which is then automatically cast to an XPath 1.0 number? In the processing of the $number parameter and the variable(s) used to recursively calculate the factorial it was being treated as some type of number, since I could perform both subtraction and multiplication on it. An XPath 1.0 number? Or an xsd:integer?? In the absence of both an as attribute and a type-information attribute is an XSLT 2.0 processor expected to produce the same behavior as in XSLT 1.0 and automatically treat parameters "intuitively"? Or is the Saxon 7.4 behaviour a carry over from its XSLT 1.0 heritage? Andrew Watt XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








