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
Saurabh PSubject: Transformation Help
Author: Saurabh P
Date: 10 Jan 2006 03:05 PM
Hello All
I am fairly new to XSLT and I have to do the following:
consider for eg. an xml file of the format
<Order>
<LineItem1>
.............
</LineItem1>

...................

<LineItemN>
...............
<LineItemN>


</Order>



I need to write an xslt to transform the above XML to something like this :

<element1>
........
</element1>

XXXXXXXXXX


<elementN>
...........
</elementN>
<OrderLines>
<LineItem1>
........
<LineItem1>

XXXXXXXXXXXX

<LineItemN>
...........
<LineItemN>


</OrderLines>


What I need to do is check for a condition in each of the line item and if a particulat condition is met , display only that particular lineitem under the <OrderLines>. However If the condition is not met in any of the LineItem then I am not supposed to display anything. Also I need to make sure that the part of the transformed xml above <OrderLines> is displayed only once (in case if two or more lineitems meet the condition that I am checking for).

This is my first xslt transformation and coming from proceedural language world , it's proving to be quite a task. Any help on this is greatly appreciated.

Thanks in advance

Posttop
Tony LavinioSubject: Transformation Help
Author: Tony Lavinio
Date: 10 Jan 2006 03:40 PM
First, are you using Stylus Studio? The answer might be simpler
if you are than if you're using some other environment. Also, do
you have real sample documents? Since this is a free support
forum, if you could simplify our task by providing appropriate
input documents, we can spend proportionately more time getting
good solutions for you.
In the meantime, we'll do the best with what you've posted so
far...

 
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.