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
Rick ScofieldSubject: XSL record lookup via a external file
Author: Rick Scofield
Date: 18 Sep 2006 01:21 PM
Hi Guys,
I have a flat file as input (from my supplier) with product numbers and attribute data which get transformed into another flat file that is used to update inventory quantities on my web site. My problem is that some of the products from the input file are no longer available or being made, so I want to lookup that product number in a external file during the transformation to determine the validity. If the product number exists in the external file, then write the transformation/record to the output file, otherwise skip it.

Any help would be much appreciated!
THX

<input file>
AB200 DST30 30 035481423321000006320061007
AB200 DST30 31 035481423338000003620060930
AB200 DST30 32 035481423345000014720060930
AB200 DST30 33 035481423352000005520060930
<output file>
B200|[CLR]=DST,[LGH]=30,[WST]=30|0000063|035481423321|1,2,3,4
B200|[CLR]=DST,[LGH]=30,[WST]=31|0000036|035481423338|1,2,3,4
B200|[CLR]=DST,[LGH]=30,[WST]=32|0000147|035481423345|1,2,3,4
B200|[CLR]=DST,[LGH]=30,[WST]=33|0000055|035481423352|1,2,3,4

Postnext
Ivan PedruzziSubject: XSL record lookup via a external file
Author: Ivan Pedruzzi
Date: 18 Sep 2006 09:35 PM
Hi Rick

Use the document function to access additional documents other then the main input

Ivan Pedruzzi
Stylus Studio Team

Posttop
Rick ScofieldSubject: XSL record lookup via a external file
Author: Rick Scofield
Date: 19 Sep 2006 09:05 AM
Thanks for the tip Ivan, I'll give that a try. As long as the document function will just access the file during the translation, while the content in the document will be dynamic/change from week to week. I just don;t want to recomplie everytime the external document content changes.

Thanks again for the help, I'll try it out
R

 
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.