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

Re: The evaluate function

Subject: Re: The evaluate function
From: Joerg Pietschmann <joerg.pietschmann@xxxxxx>
Date: Mon, 14 Jan 2002 12:28:26 +0100
xslt evaluate function
David Carlisle <davidc@xxxxxxxxx> wrote:
> If your input document is (say) an XML schema, or an XSL stylesheet it
> will contain XPaths in attribute content. How can you "XML-ify" those
> without invalidating the documents?

Can you present use cases where XML schemas of stylesheets will
have to be processend and 
- XSLT has a significant advantage for this purpose over other tools
- the mentioned XPath expressions have to be evaluated
- the stylesheet-generating-stylesheet approach is not feasible.

I didn't want to XML-ify every XPath everywhere. However, the more
often presented "use cases" for evaluate() are

1) Sort of ... well... clueless newbie problems, like the recently
   <xsl:for-each select="/some/stuff">
     <xsl:value-of select="concat('/some/other-stuff[',position(),']')"/>
 (no offense to beginners meant)
2) The somewhat less obviously solvable "user enters fieldname to be
 selected/sorted" problem:
  <xsl:param name="fieldname"/>
  <xsl:for-each select="table/$fieldname">
 Admittedly, if namespaces are used, this solution is not as robust as
 using evaluate().
3) The problems where people put longer XPaths into XML files and
 want them to use for retrieving certain nodes in some other documents,
 basically references.

As for 3), the path expressions are usually simple, using at most
positional predicates, like "/some/path/to[1]/stuff[2]". This subset
of XPath could be XMLified without all that much inconvenience.
Apart from this, quite often i wondered why they didn't use ids
for cross references (can a XForms guru explain it to me why
there are XPath expressions used in XForms?)

> ... XSLT-evaluate ...

Funny but...


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Current Thread


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.
First Name
Last Name
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.