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
Martin WildSubject: Replace a nodeset with another similar nodeset
Author: Martin Wild
Date: 10 Nov 2008 09:57 AM
Hi,

I am fairly new to XSL. I have been given some XML and I need to make the xml hierarchical. Logically this seems fairly simple as to make it hierarchical is just a case of matching ids, but I have tried numerous methods to get the structure I need to no avail. I am now putting my ineptitude down to my inexperience.

<PW xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<w id="24" name="I">
<success>
<w id="29" name="A"/>
</success>
<failure xsi:nil="true" />
</w>
<w id="29" name="A">
<success>
<w id="32" name="M"/>
</success>
<failure>
<w id="39" name="E"/>
<w id="38" name="AE"/>
</failure>
</w>
<w id="32" name="M">
<success>
<w id="33" name="ME"/>
<w id="36" name="CE"/>
</success>
<failure>
<w id="34" name="ME"/>
<w id="35" name="T"/>
</failure>
</w>
</PW>

This is just a snippet as the xml i need to convert carries on, but the above should give an indcation of what i require.
I need the node 'A' id 29 under the success node, below 'I' to be replaced by the 'A' node, the sibling of 'I'. This occurs throughout the document.
I am thinking this needs to be recursive but I am not entirely sure how to achieve this.

Thank you in advance
Martin

Postnext
Tony LavinioSubject: Replace a nodeset with another similar nodeset
Author: Tony Lavinio
Date: 11 Nov 2008 01:41 PM
Asking again won't change our answer ;)

The best source of information on general XSLT questions is
where we directed you last time. Please see
http://www.stylusstudio.com/SSDN/default.asp?action=9&read=8102&fid=48

This forum is for users of Stylus Studio who have questions specific
to support of XSLT in Stylus Studio, not for generic XSLT questions.

Posttop
Martin WildSubject: Replace a nodeset with another similar nodeset
Author: Martin Wild
Date: 12 Nov 2008 04:12 AM
Apologies

re-sending the post was a mistake.

Thanks for your help. As I did get a lot of help from these forums I thought this was the place to post the question. I stand corrected.

   
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.