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 (1168)
+ Stylus Studio Technical Forum (14386)
+ Website Feedback (244)
- XSLT Help and Discussion (7583)
-> + Use of before and after string (3) Sticky Topic
-> - how to change format of the da... (1)
-> + Search "Next 8 Results " doesn... (2)
-> - Support for Git (1)
-> + newbee (8)
-> + How to substitute element or t... (2)
-> + Xalan support in x16? (2)
-> + The context item for axis step... (5)
-> - ASP to XSL (1)
-> + xsl report, with xml feed, SVG... (4)
-> + XSLT code to transform CSV typ... (2)
-> + Make xstl file working in brow... (4)
-> - identity template, result-docu... (6)
-> ->identity template, result...
-> ->identity template, result...
-> ->identity template, result...
-> ->identity template, result...
-> ->identity template, result...
-> - identity template and xsl:resu... (1)
-> + java.lang.RuntimeException: Er... (5)
-> + How to check matching parenthe... (2)
-> - Error only on using xalan:eval... (1)
-> + XSLT not displaying SOAP respo... (2)
-> + How do i delete the node from ... (2)
-> + How to break xslt lines to mak... (4)
-- [1-20] [21-40] [41-60] Next
+ XQuery Help and Discussion (1941)
+ Stylus Studio FAQs (159)
+ Stylus Studio Code Samples & Utilities (363)
+ Stylus Studio Announcements (113)
Topic  
Postnext
Dana PearsonSubject: identity template, result-document, javalangOutofMemoryError
Author: Dana Pearson
Date: 25 Jul 2015 08:08 PM
I'm selecting a school's records from a school district's library collection of records based on a code for a school in a datafield/subfield. Something best suited to SQL but they lack the skills.

With an XML file with the code and name of the school, I am attempting what might be impossible: a stylesheet that creates 74 result documents based on a match of the school code in the aforementioned subfield and the external XML document.

If the task were to simply select records for one school, the conditional and identity template work fine.

The attempt to generate the file name for the xsl:result-document is likely failing but I get no useful feedback. Only the java out of memory error: java heap space.

If this is something that can be done, I think it's a matter of context but I have only one, the MARCXML record in the template in question. So, current version of the stylesheet uses a for-each to set the value of the variable for the file name to be used in the href attribute of the result-document element.

There is of course a very time consuming way to do this and I'm doing it now but would like to know whether even possible.

I'll attach the source file (actually only 10,000 records of 270K+), the external XML file and the stylesheet.

thanks,
Dana Pearson




Unknownextract_school_collections_v4.xsl
stylesheet

Postnext
Dana PearsonSubject: identity template, result-document, javalangOutofMemoryError
Author: Dana Pearson
Date: 25 Jul 2015 08:11 PM
another try to attach the source file and external XML file


Unknownatlanta_schools_markup.xml
external xml file

Postnext
Dana PearsonSubject: identity template, result-document, javalangOutofMemoryError
Author: Dana Pearson
Date: 25 Jul 2015 08:16 PM
source didn't appear to be uploading so selected the smallest one of 18 vs 35 MB

Postnext
Dana PearsonSubject: identity template, result-document, javalangOutofMemoryError
Author: Dana Pearson
Date: 25 Jul 2015 08:23 PM
well, source file appeared to uploading this time but when it appeared to have completed, I get an error. I'll try once more and then if not attached, anyone interested can request the file via email.

regards,
Dana

Postnext
Ivan PedruzziSubject: identity template, result-document, javalangOutofMemoryError
Author: Ivan Pedruzzi
Date: 30 Jul 2015 03:47 AM

After discussing offline we came up with a XML Pipeline based approach which scale on any catalog size.

Will report back when we have the final result.

Ivan Pedruzzi
Stylus Studio Team

Posttop
Dana PearsonSubject: identity template, result-document, javalangOutofMemoryError
Author: Dana Pearson
Date: 31 Jul 2015 12:51 PM
Ivan, you are amazing...that works perfectly!

Only know the rudiments of XQuery so what a great opportunity to dig deeper. This will also give me the opportunity to learn more about pipeline.

So, I get a solution AND a beckoning path to these two topics.

At this point, I cannot be surprised when you exceed my expectations.

Really above and beyond!

Many thanks,
Dana Pearson

   
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.