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

RE: Variable confusion

Subject: RE: Variable confusion
From: "Stuart Celarier" <stuart@xxxxxxxxxxx>
Date: Thu, 16 May 2002 09:32:26 -0700
RE:  Variable confusion
Tim, it is hard to say what the problem is without seeing more of the
XSLT stylesheet and the two XML source documents. A couple quick things:

Be certain that there is no other <xsl:variable> named 'pageNum' defined
at template-scope which would hide the top-level <xsl:variable> of the
same name.

Try stripping down the problem case: radically simplify the XML source
documents and XSLT stylesheet document until either (1) you spot the
problem or (2) you have a very small set of documents that illustrate
the problem and nothing else. Do it in a couple of steps, so you can
tell what you changed and put it back when the behavior changes. Divide
and conquer.

If that doesn't solve your problem, post a short example that
illustrates the problem.

Observe that your global variable uses the XPath expression
"/storpres/est/general/trans-page" whereas the alert evaluates this
expression "storpres/est/general/trans-page". The first expression
begins at the root node, the second expression is relative to the
context in which it is evaluated (no leading /). Is that the problem?

What is the <!DOCTYPE storpres> declaration doing in the stylesheet
document? The root element of this document is <xsl:stylesheet>, not
<storpres>. See the XML spec, 2.8 Prolog and Document Type Declaration
(http://www.w3.org/TR/2000/REC-xml-20001006#sec-prolog-dtd), the
paragraph marked Validity constraint: Root Element Type.

Cheers,
Stuart



 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.