identical key generation on multiple nodes?

  • Thread starter =?iso-8859-1?q?Jean-Fran=E7ois_Michaud?=
  • Start date
?

=?iso-8859-1?q?Jean-Fran=E7ois_Michaud?=

Hello,

I'm trying to generate identical keys on 2 different sets of nodes

Basically I need to be able to create a new identity tag on each page
where the tag is not present, but the restriction is that the ids on
each corresponding identity tag needs to match. Page number 3 id 3
needs to have the same "identity" tag (with the same id) as page number
8 id 2 same for page with page number 4 id 4 and page number 9 id 3,
page number 6 id 6 with page number 11 id 2, etc. How do I accomplish
this in XSLT? The result tree needs to be identical to this but with
the "identity" tags inserted everywhere and with matching id's on
corresponding pages. (page.figure1 spanning 3 pages and page.figure2
spanning 2 pages). the pages that don't have a preceding page
containing and identity tag are irrelevant and don't need to have such
a tag.

<document>
<page number="1" id="1">
<text/>
<text/>
</page>

<page number="2" id="2">
<identity id="page.figure1" />
<text/>
<text/>
</page>

<page number="3" id="3">
<text/>
<text/>
</page>

<page number="4" id="4">
<text/>
<text/>
</page>

<page number="5" id="5">
<identity id="page.figure2" />
<text/>
<text/>
</page>

<page number="6" id="6">
<text/>
<text/>
</page>

<page number="7" id="1">
<identity id="page.figure1" />
<text/>
<text/>
</page>

<page number="8" id="2">
<text/>
<text/>
</page>

<page number="9" id="3">
<text/>
<text/>
</page>

<page number="10" id="1">
<identity id="page.figure2" />
<text/>
<text/>
</page>

<page number="11" id="2">
<text/>
<text/>
</page>
</document>

Any help would be greatly appreciated.

Regards
Jean-Francois Michaud
 
Joined
Aug 15, 2006
Messages
10
Reaction score
0
One algorithm whihc is known as shingling algorithm is used to calculate the similarity of nodes...Just try it out...
 

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
474,005
Messages
2,570,264
Members
46,859
Latest member
HeidiAtkin

Latest Threads

Top