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
Fadi YoosufSubject: Specifying condition with count function
Author: Fadi Yoosuf
Date: 15 Jun 2009 09:36 AM
Hi

I am writing a code generation app using xslt.

My purpose is to check if any two nodes of the same parent node, have the same attribute value.
If so I want to append a number sequence in the ouput code, so that there is no duplication.


For example
-------------
if xml file is like
<code>
<methods>
<method name="first">
<method name="first">
<method name="second">
<method name="third">
</methods></code>


I want the output to be
-------------
void first1() {}
void first2() {}
void second() {}
void third() {}

Note: there is no number sequence attached to function name if it is not duplicated.

How to write XSLT to achieve this?

Thank you
Fadi

Postnext
(Deleted User) Subject: Specifying condition with count function
Author: (Deleted User)
Date: 15 Jun 2009 01:16 PM
Hi Fadi,
which version of Stylus Studio are you using, and which XSLT processor have you selected in the Scenario Dialog?

Thanks,
Alberto

Postnext
Fadi YoosufSubject: Specifying condition with count function
Author: Fadi Yoosuf
Date: 15 Jun 2009 01:53 PM
I am using Visual Studio 2008.. (version 1.0)

Posttop
(Deleted User) Subject: Specifying condition with count function
Author: (Deleted User)
Date: 16 Jun 2009 12:28 PM
I am sorry, this is the support forum for users of Stylus Studio; if you need support for other vendors' products, please use the appropriate web site.

Thanks,
Alberto

 
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.