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

Re: The Solution (Was: Re: extracting sequences)

Subject: Re: The Solution (Was: Re: extracting sequences)
From: "Dimitre Novatchev" <dnovatchev@xxxxxxxxx>
Date: Fri, 20 Feb 2004 06:49:14 +0100
dimitre novatchev solution
"Saverio Perugini" <sperugin@xxxxxxxxxxxxxxxx> wrote in message
news:Pine.LNX.4.50.0402191800040.12907-100000@xxxxxxxxxxxxxxxxxxx
> Many thanks Dimitre.
[snip]

> Wow.  It is nasty-looking.
Because of the "crosslink" invention and the different ways the arc-ID is
specified for a "link" and for a "crosslink".

> I am curious how you might
> modify your one pass solution to produce the
> same output when the input data does not contain the
> leaf nodes.

No need to modify the solution: just decide which are the last nodes in the
paths you need, then set the necessary parameters and call the getPaths
template. What is essential that the graph is acyclic as I have omitted any
check for possible looping.

>
> That is, if the input data is as follows:
>
> <RDF xmlns:r="http://www.w3.org/TR/RDF/"
> xmlns:d="http://purl.org/dc/elements/1.0/">
>   <Node r:id="Top">
>     <id>1</id>
>     <d:Title>Top</d:Title>
>     <link r:resource="Top/a"></link>
>     <link r:resource="Top/b"></link>
>     <link r:resource="Top/c"></link>
>   </Node>
>   <Node r:id="Top/a">
>     <id>2</id>
>     <d:Title>a</d:Title>
>     <link r:resource="Top/a/d"></link>
>     <link r:resource="Top/a/e"></link>
>   </Node>
>   <Node r:id="Top/b">
>     <id>3</id>
>     <d:Title>b</d:Title>
>     <link r:resource="Top/b/g"></link>
>     <crosslink r:resource="f:Top/a/e"/>
>   </Node>
>   <Node r:id="Top/c">
>     <id>4</id>
>     <d:Title>c</d:Title>
>     <crosslink r:resource="h:Top/b/g"/>
>   </Node>
> </RDF>

This is not a complete graph (at least not a complete DAG) -- leaf nodes are
completely missing.


Cheers,

Dimitre Novatchev
FXSL developer,

http://fxsl.sourceforge.net/ -- the home of FXSL
Resume: http://fxsl.sf.net/DNovatchev/Resume/Res.html




 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.