Search the web
Sign In
New User? Sign Up
rng-users · RELAX NG users
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Message search is now enhanced, find messages faster. Take it for a spin.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
show me all the paths   Message List  
Reply | Forward Message #459 of 1157 |
I'd like software that reads a RelaxNG grammar and writes out a list
of all the possible paths (through parents & children element nodes
only) to each leaf node.

I.e., I'd like to see a list of all paths through the tree from the
root to a leaf, stepping only to child elements. E.g.

/TEI/teiHeader/fileDesc/titleStmt/title
/TEI/teiHeader/fileDesc/titleStmt/title/abbr
/TEI/teiHeader/fileDesc/titleStmt/title/sic
/TEI/teiHeader/fileDesc/titleStmt/title/orig
/TEI/teiHeader/fileDesc/titleStmt/title/[text]

etc. I wouldn't mind getting intermediate steps like

/TEI
/TEI/teiHeader
/TEI/teiHeader/fileDesc
/TEI/teiHeader/fileDesc/titleStmt

but they're not what I'm currently concerned with.

I was just starting to toy with what kind of XSLT I would need to
write to do this, when a "don't reinvent the wheel" thought struck me
(especially since my XSLT is barely good enough to invent a square
:-). Someone must have written a utility, XSLT or otherwise, that
does this already, no?

Does anyone know of or have any tool that will do this?

Thanks.




Mon Nov 20, 2006 5:02 am

syd_bauman
Offline Offline
Send Email Send Email

Forward
Message #459 of 1157 |
Expand Messages Author Sort by Date

I'd like software that reads a RelaxNG grammar and writes out a list of all the possible paths (through parents & children element nodes only) to each leaf...
Syd Bauman
syd_bauman
Offline Send Email
Nov 20, 2006
5:15 am

... I'm curious about the utility of such a tool Syd? regards -- Dave Pawson XSLT XSL-FO FAQ. http://www.dpawson.co.uk...
Dave Pawson
dpawson2000
Offline Send Email
Nov 20, 2006
8:30 am

Hi, ... I am not aware of such a tool. It doesn't seem too complicated to write in XSLT, but I strongly advise to add some kind of recursion detection if you...
Eric van der Vlist
evlist
Online Now Send Email
Nov 20, 2006
10:26 am

DP> I'm curious about the utility of such a tool Syd? Ummm ... it's so obviously useful to me, I'm not sure I can articulate it. Last time I heard of such...
Syd Bauman
syd_bauman
Offline Send Email
Nov 20, 2006
9:47 pm

... Y//*[not(ancestor::Z)] Perhaps a good xpath tool might suffice? regards -- Dave Pawson XSLT XSL-FO FAQ. http://www.dpawson.co.uk...
Dave Pawson
dpawson2000
Offline Send Email
Nov 21, 2006
8:01 am

Yes, but what is the document you apply the XPath on? Back to Syd's original problem... Regards, George ... George Cristian Bina <oXygen/> XML Editor, Schema...
George Cristian Bina
george_bina
Offline Send Email
Nov 21, 2006
8:25 am

... Queries against the schema? Mmm. Does Oxygen provide a tree view? [I'll shut up, I'm still asking why :-)] regards -- Dave Pawson XSLT XSL-FO FAQ. ...
Dave Pawson
dpawson2000
Offline Send Email
Nov 21, 2006
9:34 am

... If it did, it would have to solve this same issue of detecting recursion otherwise its trees would grow infinitely :) Eric ... -- GPG-PGP: 2A528005 Curious...
Eric van der Vlist
evlist
Online Now Send Email
Nov 21, 2006
9:50 am

Actually there is a tree view, rendered as a diagram. If you look at the logical model view then you can basically see some of the information Syd asked for....
George Cristian Bina
george_bina
Offline Send Email
Nov 21, 2006
11:42 am

Whooee! A thought occurs to me. Because TEI schemas never use co-occurrence constraints and because I'm only interested in ancestry, not parent/child...
Syd Bauman
syd_bauman
Offline Send Email
Nov 22, 2006
3:13 am

Hi Syd, I tried to generate all possible elements on teilite.rng. After a few minutes I got a 330MB of content and the application was still running, so the...
George Cristian Bina
george_bina
Offline Send Email
Nov 22, 2006
1:43 pm

... I got up to over a gigabyte of log file when I tried on something even smaller. There are just too many possible routes. However, when I tried the...
Sebastian Rahtz
sebastianrahtz
Offline Send Email
Nov 22, 2006
2:22 pm

What was I thinking? I had a little time to think about this (American holiday and all :-) and realize that this is not just bigger than is useful, it's bigger...
Syd Bauman
syd_bauman
Offline Send Email
Nov 23, 2006
7:29 pm

... Would an html view help Syd? I document my schemas by using the div wrappers, but it produces readable html which 'sort of' has the structure. <div...
Dave Pawson
dpawson2000
Offline Send Email
Nov 21, 2006
11:54 am
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help