Subject: Re: extracting sequences
From: Dimitre Novatchev <dnovatchev@xxxxxxxxx>
Date: Thu, 19 Feb 2004 00:19:35 -0800 (PST)
|
> Hello,
>
> The following RDF models a hierarchical website of 7 nodes with a max
> depth of 2.
I don't see any graph described in your xml document.
> I would like to transform it into a text file containing
> each path through the site, one per line, where a path is a space
> delimited sequence of hyperlink labels from the root of the site to a
> leaf.
>
> Therefore, for the following RDF data, I'd like to produce:
>
> --
> a d
> a e
> b f
> b g
> c h
> --
>
> Can xslt realize this transformation?
It is not xslt that will create the transformation, but an XSLT
programmer.
> The problem is challenging
> because 1) the RDF data models a DAG (directed acyclic graph), due to
> the presence of crosslinks, rather than just a tree, and 2) there is no
> way to associate any node with its parents and therefore the processing
> must proceed in a top-down, rather than bottom-up, fashion.
Seems quite straightforward to me -- especially if you explain the problem
properly.
Could you draw the graph and explain how its vertices and arcs are
specified in your xml document? What is the meaning of a "crosslink"?
Cheers,
Dimitre Novatchev
FXSL developer,
http://fxsl.sourceforge.net/ -- the home of FXSL
Resume: http://fxsl.sf.net/DNovatchev/Resume/Res.html
> Top-down
> processing is generally convenient when things are nested, but they are
> not in this case.
>
> <RDF xmlns:r="http://www.w3.org/TR/RDF/"
> xmlns:d="http://purl.org/dc/elements/1.0/">
>
> <Node r:id="Root">
> <num> 1</num>
> <d:Title> Root</d:Title>
> <link r:resource="Root/a"> </link>
> <link r:resource="Root/b"> </link>
> <link r:resource="Root/c"> </link>
> </Node>
>
> <Node r:id="Root/a">
> <num> 2</num>
> <d:Title> a</d:Title>
> <link r:resource="Root/a/d"> </link>
> <link r:resource="Root/a/e"> </link>
> </Node>
>
> <Node r:id="Root/b">
> <num> 3</num>
> <d:Title> b</d:Title>
> <link r:resource="Root/b/g"> </link>
> <crosslink r:resource="f:Root/a/e"> </symbolic>
> </Node>
>
> <Node r:id="Root/c">
> <num> 4</num>
> <d:Title> c</d:Title>
> <crosslink r:resource="h:Root/b/g"> </link>
> </Node>
>
> <Node r:id="Root/a/d">
> <num> 5</num>
> <d:Title> d</d:Title>
> </Node>
>
> <Node r:id="Root/a/e">
> <num> 6</num>
> <d:Title> e</d:Title>
> </Node>
>
> <Node r:id="Root/b/g">
> <num> 7</num>
> <d:Title> g</d:Title>
> </Node>
>
> </RDF>
__________________________________
Do you Yahoo!?
Yahoo! Mail SpamGuard - Read only the mail you want.
http://antispam.yahoo.com/tools
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|