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
Conferences Close Tree View
+ Stylus Studio Feature Requests (1192)
+ Stylus Studio Technical Forum (14621)
+ Website Feedback (249)
- XSLT Help and Discussion (7625)
-> + Use of before and after string (3) Sticky Topic
-> - How do I substitute element ty... (1)
-> + How does one add working days ... (4)
-> - Help, I have existing XLT and... (1)
-> + Need help on XSLT issue - (2)
-> + EDI to XML Conversion (7)
-> - XML To JSON Conversion using X... (1)
-> + Formatting Paragraphs to same ... (2)
-> - Grouping of records (1)
-> + Problems with xsd 1.1 (4)
-> + XML to HL7 mapping (3)
-> + XSLT 3 and Iterate (2)
-> + XSL-FO to PDF preview (3)
-> + java.lang.RuntimeException: Er... (2)
-> + Create Acroforms with Stylus X... (2)
-> + How to change XSLT parameter s... (3)
-> + how to change format of the da... (2)
-> + Search "Next 8 Results " doesn... (2)
-> - Support for Git (1)
-> + newbee (8)
-- [1-20] [21-40] [41-60] Next
+ XQuery Help and Discussion (2017)
+ Stylus Studio FAQs (159)
+ Stylus Studio Code Samples & Utilities (364)
+ Stylus Studio Announcements (113)
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

   
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.