XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
ajay shahSubject: Another Function Query
Author: ajay shah
Date: 12 Apr 2006 05:19 PM
Stylus Studio Version: 6
XSLT processors tried: Saxon 6 and In Built

I am using a simple concat function in the stylesheet.
This function runs fine during the initial section of stylesheet.
However further down in the same stylesheet it stops working.

<nodeABC id="concat('Amount-',$countValue)">
..
</nodeABC>

Where $countValue is a global variable.

Size of stylesheet = 32 KB.

Any ideas ?

Postnext
Ivan PedruzziSubject: Another Function Query
Author: Ivan Pedruzzi
Date: 12 Apr 2006 05:49 PM
What does it mean "it stops working"?
Do you get an error? do you get an unexpected result?
Are you sure that $countValue evaluates always to a value?

Ivan Pedruzzi
Stylus Studio Team

Postnext
ajay shahSubject: Another Function Query
Author: ajay shah
Date: 12 Apr 2006 06:00 PM
No error returned.
Concat function itself stops working.
Doesnt matter what you concat...variables or simple text.

The output will simply say

<item id="concat($count,'amount')">

instead of

..
<item id="234amount">
...


As I said before...this works fine in the upper part of the stylesheet. Few lines below, it stops working...

Postnext
ajay shahSubject: Another Function Query
Author: ajay shah
Date: 12 Apr 2006 06:02 PM
Forgot to mention.
I downloaded the latest version of Stylus Studio from your website.

The error persist.

Posttop
Ivan PedruzziSubject: Another Function Query
Author: Ivan Pedruzzi
Date: 12 Apr 2006 06:17 PM

"concat" is an xpath function, it doesn't get evaluated in any context you put it. What you wrote is just a simple XML fragment.

Change your code to use curly braces {} like that

<nodeABC id="{concat('Amount-',$countValue)}">
..
</nodeABC>


Ivan Pedruzzi
Stylus Studio Team

 
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.