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)
-> + Map field if source is not nul... (3)
-> + XSLT group and sort whith gene... (4)
-> + Nested XML value (2)
-> - Specifying condition with coun... (4)
-> ->Specifying condition with...
-> ->Specifying condition with...
-> ->Specifying condition with...
-> + xsl:function using found in er... (4)
-> + How to remove an unwanted spac... (2)
-> + Question about variable substi... (2)
-> + XSL for Comparing nodes and di... (4)
-> + External lookup list (8)
-> + XSL HTML output now needs to b... (2)
-> + Adding a new sub element to th... (4)
-> + How do I get rid of 'Tip' node... (9)
-> + Trying to dynamically create n... (2)
-> + Display XML link, using XSLT a... (9)
-> + calling templates based on ord... (2)
-> + How to add internal links usin... (4)
-> + How to call user defined java ... (3)
-> + XSLT and WebApps past and futu... (3)
-> + passing condition through java... (3)
-> + Apllying a template from withi... (4)
-- Previous [301-320] [321-340] [341-360] Next
+ XQuery Help and Discussion (2017)
+ Stylus Studio FAQs (159)
+ Stylus Studio Code Samples & Utilities (364)
+ Stylus Studio Announcements (113)
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

   
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.