[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: In Tears... (learning XPath)
At 11:45 14-07-2000 -0500, Jason A. Buss wrote:
I cannot, for the life of me, get the expression syntax correct. Both of those syntactic expressions are somewhat misleading. The XPath one means that concat() takes multiple expressions, separated by commas. The asterisk indicates that there should be two, and that the third one is not only optional but also repeatable (i.e., that there may be more than three arguments). The SAXON documentation correctly observes that concat() can take one expression. The curly braces encapsulate both the comma and the second expression, and indicate that the encapsulation may be repeated. Both are saying that concat() takes multiple arguments separated by commas. The main problem you're having is with the nature of an expression. The variable part ($sect1num) is correct, since a variable reference is a valid expression. But the .htm for instance is wrong. A literal string expression must be surrounded by quotes: '.htm'. It's not clear whether sect1 is an XPath or a string. If it were a string, you'd want concat('sect1', $sect1num, '.htm') If sect1 is a path intended to get the value of the sect1 child of the current node, then you would do concat(sect1, $sect1num, '.htm') HTH, Chris -- Christopher R. Maden, Senior XML Analyst, Lexica LLC 222 Kearny St., Ste. 202, San Francisco, CA 94108-4510 +1.415.901.3631 tel./+1.415.477.3619 fax <URL:http://www.lexica.net/> <URL:http://www.oreilly.com/%7Ecrism/> 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
|