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 10 11 12 13 14 15 16 17 18 19 20 Go to previous topicPrev TopicGo to next topicNext 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

 
Topic Page 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 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.