cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kevin D'Allaird <kevin.dalla...@xmls.com>
Subject Matching elements by id
Date Wed, 07 Jun 2000 22:13:32 GMT

Any help with the following would be greatly appreciated.


I have the following in an XML file

   <p>To learn more click <link idref="learn_more">here</link>.</p>


I have this in the same file

	<category id="contact">
		<name>Contact Us</name>
		<uri>contact/</uri>
		<resource type="page" id="learn_more">
			<name>Learn More</name>
			<uri>learn_more.xml</uri>
		</resource>
		....
  </category>

  
I would like to transform <link> .... </link> to
<a href="learn_more.xml">here</a>

i.e. find the element with id equal to the value of idref and return the
value of child uri

Once that works, I will add the element's ancestor's uris to create a
full-path to the resource.

I just can't seem to nail it down.  Any ideas?

Mime
View raw message