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 Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
Ed FaitsSubject: Real Beginner Question
Author: Ed Faits
Date: 16 Jan 2006 11:13 AM
I'm trying to create XML from a spreadsheet, via a schema provided by a vendor.

I've created some XML from the spreadsheet, (attached), that has company names and contacts.

What I want to end up with is several contacts for each unique company. What I'm getting now is a single account and contact for each row of my spreadsheet. An example is:

What I want:
<Account>
<AccountName="AAA Aircraft">
<Contacts>
<Contact>
<ContactName = "Betty">...
</Contact>
<Contact>
<ContactName = "Jane">
</Contact>
</Contacts>
</Account>

What I'm getting:
<Account>
<AccountName="AAA Aircraft">
<Contacts>
<Contact>
<ContactName = "Betty">...
</Contact>
<Contacts>
</Account>
<Account>
<AccountName="AAA Aircraft">
<Contacts>
<Contact>
<ContactName = "Jane">...
</Contact>
<Contacts>
</Account>


Documentsample(5).xml
Sample of my source XML

Postnext
Tony LavinioSubject: Real Beginner Question
Author: Tony Lavinio
Date: 16 Jan 2006 03:00 PM
You want to group by content using a method called the Muenchian Method.
See http://www.jenitennison.com/xslt/grouping/#by-content and there are
several examples showing how to solve _exactly_ your problem.

Posttop
Ed FaitsSubject: Real Beginner Question
Author: Ed Faits
Date: 16 Jan 2006 03:54 PM
Wow, looks ugly in the Stylus Studio Mapper, but works like a champ.

Thanks much.

-EGF

 
Topic Page 1 2 3 4 5 6 7 8 9 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.