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

RE: patterns

Subject: RE: patterns
From: "Passin, Tom" <tpassin@xxxxxxxxxxxx>
Date: Fri, 4 Apr 2003 13:34:25 -0500
sablotron error pattern is empty
[ 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


Current Thread
  • patterns
    • Terence - Fri, 4 Apr 2003 12:14:54 -0500 (EST)
      • <Possible follow-ups>
      • Passin, Tom - Fri, 4 Apr 2003 13:30:51 -0500 (EST) <=

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.