[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: patterns
[ Terence] Hopefully I will eventually do enough XSL/Xpath to > actually understand it when I come back and read it again some time. > > Anyway, I have a question... > > Why doesn't this work? > <xsl:value-of > select="./ceiling((endODBCDate/@unixTS - > startODBCDate/@unixTS) div 60)" > /> > > Sablotron says > "pattern is empty" What you need in not an answer to this question but to learn how to solve this kind of problem. One way is to run another processor to try to get a more helpful error message. Saxon says "Error in expression ./ceiling((endODBCDate/@unixTS - startODBCDate/@unixTS) div 60): Unexpected token [<function>] in path expression" A second approach is to simplify. Using <xsl:value-of select="./ceiling(1)"/> gives the same result. So obviously it is the pattern and not the context node that is at fault. In fact, the cuprit is the leading "./". A node or path specification has to follow this path expression, but you have a function (ceiling()) instead. You never need to use "./" anyway even for a path expression (this is not unix, after all) - since it is implied when you just write a node name - just remove it and then the processor will not expect a path expression - <xsl:value-of select="ceiling((endODBCDate/@unixTS - startODBCDate/@unixTS) div 60) Cheers, Tom P 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
|