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)
-> - Stylus Studio - Registrar en o... (1)
-> + Stylus Studio - Registrar en o... (2)
-> + Can a pipeline send a file by ... (2)
-> + After Updateing WIN10 to WIN11... (12)
-> + Where do I add the custom java... (3)
-> + Where is the Diagram tab? (5)
-> + Applying XSLT to Word DOCX/XML (2)
-> - CSV conversion via ConvertToXM... (1)
-> + Text symbols in SS not same as... (4)
-> + Exposing xquery as webservice ... (6)
-> + Syntax Identifier (2)
-> + Saving a Converted XML as an X... (5)
-> + Output document cannot be pars... (4)
-> - Archiving output from conversi... (1)
-> + EDIFACT guideline from Stylus ... (3)
-> + CSV file putting all the data ... (5)
-> + Can't install Home version 64b... (5)
-> + presale - Can I covers this sc... (5)
-> + Problem with UNB (5)
-> + Splitting EDIFACT files pipeli... (4)
-- [1-20] [21-40] [41-60] Next
+ Website Feedback (249)
+ XSLT Help and Discussion (7625)
+ XQuery Help and Discussion (2017)
+ Stylus Studio FAQs (159)
+ Stylus Studio Code Samples & Utilities (364)
+ Stylus Studio Announcements (113)
Topic  
Postnext
Andreas RieggSubject: Substring-function problem in Stylus (second)
Author: Andreas Riegg
Date: 31 Aug 2000 10:24 AM
Hi,

I'm using Stylus 2.0.08 and do some examples with the JavaML stuff from http://www.cs.washington.edu/homes/gjb/JavaML/. Using the stylesheet examples that convert the JavaML examples to HTML or Java source back, I encountered a problem with the substring-function in Stylus. In one of the templates, the following statement is used (I replaced the angle brackets by these {} brackets):

{xsl:value-of select="substring('[][][][][][][][][][][][][][][][][]',1,@dimensions * 2)"/}

This code is used to generate type declarations in Java that have a dimension. However, in most cases the associated dimension is missing (which equals to zero?, the DTD has no default value for this attribute) which leads to an actual expression in the following form:

{xsl:value-of select="substring('[][][][][][][][][][][][][][][][][]',1,0)"/}.

The output in this case should be none of the []-brackets, but instead always all of the brackets appear in the result. Even changing the third argument of the substring-function from @dimensions * 2 to direct hard coded 0 creates the same wrong result. So even when the missing attribute may not default to zero, a hardcoded zero should lead to the correct result.

Additional info: I tried the same sheet in the XSLT-tools of the eXcelon explorer and it worked correctly there.

Dr. Andreas Riegg
DaimlerChrysler AG
ITM - SP&D/ED
Email: andreas.riegg@daimlerchrysler.com
(Please use this email, not my old one at debis!)



Postnext
(Deleted User) Subject: Substring-function problem in Stylus (second)
Author: (Deleted User)
Date: 01 Sep 2000 11:52 AM
Thanks for the report. An engineer will look into it.

Alex Lloyd
eXcelon corp.

Posttop
Andreas RieggSubject: Substring-function problem in Stylus (second)
Author: Andreas Riegg
Date: 24 Oct 2000 09:51 AM
Any news or fixes about this issue so far?

Andreas

   
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.