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
Mike SappSubject: Output files
Author: Mike Sapp
Date: 29 Mar 2007 11:24 AM
Originally Posted: 29 Mar 2007 11:19 AM
Hello,

Im trying to take one xml file and break the resulting output XSLT converted files into separate xml files named after the text in an element.

Input file:

<document>
<book>
<chapter1>Hello</chapter1>
</book>
<book>
<chapter1>There</chapter1>
<book>
<chapter1>Stylus</chapter1>
</document>

I would like all of the book elements information to be for each output file and would like to have the xml output broken up into individual outputs with the name of the <chapter1> elements text as the output xml name

I want to get the output to look like:

Hello.xml
<book>
<chapter1>Hello</chapter1>
</book>

There.xml
<book>
<chapter1>There</chapter1>
</book>

Stylus.xml
<document>
<book>
<chapter1>Stylus</chapter1>
</book>

Sorry for the naivete of the question ...

Postnext
Ivan PedruzziSubject: Output files
Author: Ivan Pedruzzi
Date: 29 Mar 2007 05:43 PM

Hi Mike,

You need to use XSLT 2.0, please have a look at result-document
http://www.w3.org/TR/xslt20/#element-result-document


Hope this helps
Ivan Pedruzzi
Stylus Studio Team
http://www.stylusstudio.com/xml_download.html

Postnext
Mike SappSubject: Output files
Author: Mike Sapp
Date: 31 Mar 2007 05:49 AM
HI Ivan,

I had a look through the Result Tree, Multiple Result Documents and Serializations and am no closer to doing this transformation... Im attaching the source, target (example) and the xsl that i have done so far... Im really new to XSLT and any help is greatly appreciated. I need to have each output xml to be named after each releases UPC and label name and to contain the data for only one of the releases....


Document20070301151501.xml
Source

DocumentMappingOutput.xml
Output target

DocumentBreakpointtest2.29.xsl
xsl i have done so far

Postnext
Mike SappSubject: Output files
Author: Mike Sapp
Date: 03 Apr 2007 10:22 AM
I really am stuck with this as im new to XSLT's. Any help would be extremely appreciated-

Postnext
Ivan PedruzziSubject: Output files
Author: Ivan Pedruzzi
Date: 03 Apr 2007 12:08 PM
Mike,

In oder to get help from this forum you have to be an active Stylus Studio user. Unfortunately we are unable to identify your Stylus Studio license.

Please send your Stylus Studio installation ID (click Help -> About) to stylus-field-report@progress.com

Thanks
Ivan Pedruzzi
Stylus Studio Team

Postnext
Mike SappSubject: Output files
Author: Mike Sapp
Date: 03 Apr 2007 07:50 PM
Mailed ;)

Posttop
Ivan PedruzziSubject: Output files
Author: Ivan Pedruzzi
Date: 03 Apr 2007 10:58 PM

What you are trying to accomplish with the following?
<xsl:for-each-group select="document/*" group-starting-with="release">

Please see the attached solution; the global variable outputdir is used to define the output directory.

Ivan Pedruzzi
Stylus Studio Team


DocumentBreakpointtest2.29(1).xsl

 
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.