ASP Error: 70
Description: Permission denied
Source: Microsoft VBScript runtime error

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

RE: [XSL] How can I seek info in XML files and tranfor

Subject: RE: [XSL] How can I seek info in XML files and tranform it using XSLT to answer a query
From: "Paul Brown" <prb@xxxxxxxxxxxxx>
Date: Wed, 11 Jul 2001 08:36:56 -0500
RE:  [XSL] How can I seek info in XML files and tranfor
edouard panie:
> Thanks for answering. I should give some more details:
> -money is not the issue, I dont have any (it's a
> school project!)

Since you're a student, you're a very rich man indeed -- you have lots of
time.

> -the pages will only be accessible to a few people,
> therefore there won't be more than a few hits a day.

If you don't want the implementation necessarily to be fast, you can spoof
an XSLT processor into thinking that your collection of files is one large
document, and that will allow you to use XPath as your query language.

Disclaimer 1: an XML database is going to do a MUCH, MUCH better job than
the hack below.

Here's how you do it.

1) Take a look at the old SQL extensions for XalanJ2 or the XSLT-based
flatfile mapper that I wrote as an example for a Java/XSLT class.
(http://www.fivesight.com/downloads/xsltflatfile.asp)

2) Implement a spoof DOM that mirrors the concatenation of your
directory/file structure and your individual XML files.  For example, this
means that the implementation of Node that represents a directory has to
return a list of the files it contains (as wrapping Nodes) when
getChildNodes() is called.

I would suggest implementing an equivalent<directory name="foo"><file
name="bar.xml" >[... ...]</file><file name="baz.xml" >[...
...]</file></directory>

Where the children of file are the children of the document element of the
XML document contained in the file.

3) Do something really, really naughty and make use of how Xalan actually
traverses XML documents on an xsl:apply-templates call.  (You will NOT be
able to use xsl:for-each!)  This is present in the examples that I mention
in (1) above.

Cheers,

- Paul


 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.