Sign Up
Search
Options
search
Chat
Help
News
Log in
Not Logged in
Home
»
Boards
»
Stylus Studio Developer Network
»
XSLT Help and Discussion
»
Table aggroupament
Topic
Topic Page
1
2
3
4
5
6
7
8
9
Prev Topic
Next Topic
next
Subject:
Table aggroupament
Author:
Nacho Pistacho
Date:
21 Jun 2007 06:14 AM
Hello
I have to do this transform :
"ORGINAL XML"
<root>
<AAA>
<DATA1>BLABLA</DATA1>
<DATA2>BLABLA</DATA2>
</AAA>
<AAA>
<DATA1>BLEBLE</DATA1>
<DATA2>BLEBLE</DATA2>
</AAA>
<CCC>ASDF</CCC>
...
...
<BBB>
<DDD>VALUE</DDD>
<EEE>
<DATA1>VALUE1</DATA1>
<DATA2>VALUE2</DATA2>
</EEE>
<EEE>
<DATA1>VALUE3</DATA1>
<DATA2>VALUE4</DATA2>
</EEE>
</BBB>
</root>
"DESIRED TRANSFORM"
<root>
<AAA>
<!-- Here comes the changes -->
<rowAAA rownum="1">
<DATA1>BLABLA</DATA1>
<DATA2>BLABLA</DATA2>
</rowAAA>
</AAA>
<AAA>
<rowAAA rownum="2">
<DATA1>BLEBLE</DATA1>
<DATA2>BLEBLE</DATA2>
</rowAAA>
</AAA>
<CCC>ASDF</CCC>
...
...
<BBB>
<DDD>VALUE</DDD>
<EEE>
<rowEEE rownum="1">
<DATA1>VALUE1</DATA1>
<DATA2>VALUE2</DATA2>
</rowEEE>
</EEE>
<EEE>
<rowEEE rownum="2">
<DATA1>VALUE3</DATA1>
<DATA2>VALUE4</DATA2>
</rowEEE>
</EEE>
</BBB>
</root>
So, i need to identify sibling nodes with the same tagname and put it into a table with different "rownumber" for each one.
In the entry, if there are any table, comes continuous
Any help are welcome,
Thanks!!
top
Subject:
Table aggroupament
Author:
(Deleted User)
Date:
26 Jun 2007 06:24 AM
If all you need is retrieve the value for the rownumber attribute, you can use count(preceding-sibling::AAA)+1
Hope this helps,
Alberto
Topic Page
1
2
3
4
5
6
7
8
9
Prev Topic
Next Topic
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 to Conference:
Select Conference
Stylus Studio Feature Requests
Stylus Studio Technical Forum
Website Feedback
XSLT Help and Discussion
XQuery Help and Discussion
Stylus Studio FAQs
Stylus Studio Code Samples & Utilities
Stylus Studio Announcements
go
Log In Options
Username:
Password:
Site Map
|
Privacy Policy
|
Terms of Use
|
Trademarks
Stylus Scoop XML Newsletter:
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.