Re: [xsl] The Solution (Was: Re: extracting sequences)

Subject: Re: [xsl] The Solution (Was: Re: extracting sequences)
From: Saverio Perugini <sperugin@xxxxxxxxxxxxxxxx>
Date: Thu, 19 Feb 2004 18:00:53 -0500 (EST)
Many thanks Dimitre.

On Feb 19, 2004, at 4:19 PM, Dimitre Novatchev wrote:

>First a remark that the structure of your xml document is very ugly and not
>supporting an efficient and intuitive representation of a graph.

I completely agree.  Unfortunately, I did not develop the
dataset.

>The direct (one pass) solution will necessarily be itself ugly, reflecting its input ... :(

Wow.  It is nasty-looking.  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.

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>

Thank You and Best Regards,
Saverio

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread