[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: XSL-List Digest V4 #1511

Subject: Re: XSL-List Digest V4 #1511
From: James Cummings <James.Cummings@xxxxxxxxx>
Date: Wed, 30 Jul 2003 09:14:43 +0100 (BST)
 Re: XSL-List Digest V4 #1511
>Date: Tue, 29 Jul 2003 16:14:55 +0100
>From: "Andrew Welch" <AWelch@xxxxxxxxxxxxxxx>
>Subject: RE:  testing which files have same element/@code
>
>> What I want to do is given a @code as an xsl:param or variable
>> look through each file in filelist.xml to produce a list of
>> those files which contain a @code that matches, outputting
>> something like say an html form (assuming file3.xml doesn't contain
>> a bar/@code='124')
>
>Well you *could* do this in xslt using the the document() function, but
>building a dom each time just to check for the occurance of attribute
>would be really wasteful.
>
>I would SAX parse your filelist.xml to obtain your list of files.  Then
>SAX parse each of thoes files in turn to find the ones with the matching
>@code.
>
>Once you have a list of matching files, use JDOM or David Megginson's
>xmlWriter (or preferrably generate SAX events directly from the java
>list, as I mentioned in the previous post) to create the XML of matching
>files.  Then style that with your stylesheet.
>
>Of coure, you could just write the html directly from your java
>list-of-matching-files, but as this is the xsl-list and that technique
>goes against the whole separation-of-content-from-style idea, you don't
>want to do that :)

Thanks for your suggestions.  I know very little about java and so don't
really see writing things in it as a possibility.  Given that this will
be used inside apache's Cocoon, it sounds like probably the best way.
Any suggestions on SAX parsing in Cocoon?

Horribly out of his depth,
-James

-- 
Dr James Cummings, James.Cummings@xxxxxxxxx, http://www.uea.ac.uk/~q503
Cursus Project, School of Music, University of East Anglia,
Norwich, Norfolk, NR4 7TJ, UK  Tel:(01603)593-595



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.