File System Queries

M

Mike King

I want to ask a general question to see if anyone has done a similar thing.
I'm thinking about creating an application that will allow me to run queries
across several XML files. I would like to use the power of the XSLT
language to help me with this problem. So I'm thinking about creating a
very simplistic language similar to XSLT that will accomplish this. I will
use XSLT to transform my language into XSLT. That XSLT will produce an HTML
file with JavaScript code in it, so I can have an interactive results that
will be displayed in a web browser.

MyLang --(using XSLT)--> XSLT --> HTML

Has anyone done anything like this? I know Schematron uses a similar
approach. I also know about XQuery, but I don't know of any good free GUI
tool for it yet. I just want to make sure I'm not reinventing the wheel.
 
A

Andy Dingley

I want to ask a general question to see if anyone has done a similar thing.
I'm thinking about creating an application that will allow me to run queries
across several XML files.

Sounds like a reasonable approach. Generating XSLT dynamically is
certainly a well-respected technique,

The downside is that XSLT uses XPath. Can XPath do the querying you
need in the final process ?
 
M

Mike King

Sounds like a reasonable approach. Generating XSLT dynamically is
certainly a well-respected technique,

The downside is that XSLT uses XPath. Can XPath do the querying you
need in the final process ?

Probably not but I was going to create some XPath Extension Functions to
create the desired behavior.
 
G

Gerald Aichholzer

Mike said:
Probably not but I was going to create some XPath Extension Functions to
create the desired behavior.

Cocoon's XPathDirectoryGenerator could be used for this task.
You specify a directory which is scanned recursively and returned
as a XML structure.

In addition you can specify a regular expression and a XPath
expression. The XPath expression is applied to each files
matching the regular expression and the result is included
in the returned XML structure.

More information (including an example) can be found at
http://cocoon.apache.org/2.1/userdocs/generators/xpathdirectory-generator.html

HTH,
Gerald
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top