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)
-> - Stylus Studio - Registrar en o... (1)
-> + Stylus Studio - Registrar en o... (2)
-> + Can a pipeline send a file by ... (2)
-> + After Updateing WIN10 to WIN11... (12)
-> + Where do I add the custom java... (3)
-> + Where is the Diagram tab? (5)
-> + Applying XSLT to Word DOCX/XML (2)
-> - CSV conversion via ConvertToXM... (1)
-> + Text symbols in SS not same as... (4)
-> + Exposing xquery as webservice ... (6)
-> + Syntax Identifier (2)
-> + Saving a Converted XML as an X... (5)
-> + Output document cannot be pars... (4)
-> - Archiving output from conversi... (1)
-> + EDIFACT guideline from Stylus ... (3)
-> + CSV file putting all the data ... (5)
-> + Can't install Home version 64b... (5)
-> + presale - Can I covers this sc... (5)
-> + Problem with UNB (5)
-> + Splitting EDIFACT files pipeli... (4)
-- [1-20] [21-40] [41-60] Next
+ Website Feedback (249)
+ XSLT Help and Discussion (7625)
+ XQuery Help and Discussion (2016)
+ Stylus Studio FAQs (159)
+ Stylus Studio Code Samples & Utilities (364)
+ Stylus Studio Announcements (113)
Topic  
Postnext
Shalini venkateswaranSubject: Help to group using WYSIWYG
Author: Shalini venkateswaran
Date: 06 Jul 2005 04:56 PM
Need to understand how I can group using wysiwig part of tool if at all.
I have a requirement for this, i saw samples but now gui.
<data>
<record>
<KEY xml:lang="en_US">1</KEY>
<PET xml:lang="en_US">notapuppy</PET>
<ISSUE_DATE xml:lang="en_US">June 29, 2005</ISSUE_DATE>
<FULL_PATH xml:lang="en_US">notapuppy.xls</FULL_PATH>
<ACTIVE xml:lang="en_US">0</ACTIVE>
</record>
<record>
<KEY xml:lang="en_US">3</KEY>
<PET xml:lang="en_US">notapuppy</PET>
<ISSUE_DATE xml:lang="en_US">July 5, 2005</ISSUE_DATE>
<FULL_PATH xml:lang="en_US">filename.xls</FULL_PATH>
<ACTIVE xml:lang="en_US">0</ACTIVE>
</record>
</data>
Needs to show up as

<table>
<tr>
<td>notapuppy<td> <td>
<td>
<table>
<tr>
<td><a href="notapuppy.xls">notapuppy.xls</a><td>
<td>July 5, 2005</td>
</tr>
<tr>
<td><a href="filename.xls">filename.xls</a><td>
<td>June 29, 2005</td>
</tr>
</table>
</td>
</tr>
</table>
Thanks

Postnext
Ivan PedruzziSubject: Help to group using WYSIWYG
Author: Ivan Pedruzzi
Date: 06 Jul 2005 11:24 PM
Hi Shalini,

Here what I did

- drag & drop the element "record" to the canvas and click "Add Table"
- drag & drop the element "PET" into the first cell
- right click in the second cell then click "Insert Table" (1 row 2 columns)
- drag & drop the element "FULL_PATH" in the first cell of the inner table
- drag & drop the element "ISSUE_DATE" in the second cell of the inner table

switch to XSLT source

- define the xsl key to implement the grouping
- add the predicate to the for-each loop to restrict the loop to the group
- add an inner for-each loop to pull the group values

You can see the read solution here

Hope this helps
Ivan Pedruzzi
Stylus Studio Team


<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:key name="PET" match="data/record" use="PET"/>

<xsl:output method="html"/>

<xsl:template match="/">
<html><head></head>
<body>
<table width="100%" border="1">
<tbody>
<xsl:for-each select="data/record[generate-id() = generate-id(key('PET',PET)[1])]">
<tr>
<td width="50%">
<xsl:value-of select="PET"/>
</td>
<td width="50%">
<table width="100%" border="1">
<tbody>
<xsl:for-each select="key('PET',PET)">
<tr>
<td width="50%">
<xsl:value-of select="FULL_PATH"/>
</td>
<td width="50%">
<xsl:value-of select="ISSUE_DATE"/>
</td>
</tr>
</xsl:for-each>
</tbody>
</table>
</td>
</tr>
</xsl:for-each>
</tbody>
</table>
</body>
</html>
</xsl:template>

</xsl:stylesheet>

Posttop
Shalini venkateswaranSubject: Help to group using WYSIWYG
Author: Shalini venkateswaran
Date: 07 Jul 2005 12:31 PM
Ivan
Thank you very much that helped.
I am sure this was not my last post. Have some many to many grouping problems, where the table column names have to be built dynamically.
I'm trying to figure out if I want to retrieve the data as one big xml (denormalized) or 3 diff ones. Will post something soon
As a famous saying goes,
I'll be back

   
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.