cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matthew Langham" <mlang...@sundn.de>
Subject XSL-Help
Date Wed, 29 Mar 2000 13:21:31 GMT
Hi!

We are beginners when it comes to XSL - and would like to do the following:

We have an XML stream which looks like this:

<XML>
	<MAPPINGS>
		<ACCOUNT>
			<TYPE>15</TYPE>
			<DESCRIPTION>This is short</DESCRIPTION>
		</ACCOUNT>
		<ACCOUNT>
			<TYPE>16</TYPE>
			<DESCRIPTION>Shorter</DESCRIPTION>
		</ACCOUNT>
	</MAPPINGS>
 	<ACCOUNTLIST>
		<ACCOUNT>
			<NUMBER>123456789<NUMBER>
			<TYPE>15</TYPE>
			<DESCRIPTION>This is a long description</DESCRIPTION>
		</ACCOUNT>
		<ACCOUNT>
			<NUMBER>11111111<NUMBER>
			<TYPE>16</TYPE>
			<DESCRIPTION>This is a longer description</DESCRIPTION>
		</ACCOUNT>
	</ACCOUNTLIST>
	<MAPPINGS>
</XML>

In the output each ACCOUNT in ACCOUNTLIST should have its DESCRIPTION
replaced with a DESCRIPTION from the corresponding ACCOUNT in the MAPPINGS
section (depending on the type). i.e. replace the long description with the
short one.

How can this be achieved using XSL and cocoon?

Thanks

Matthew

--
=================================================================
Matthew Langham, S&N AG, Klingenderstrasse 5, D-33100 Paderborn
Tel: +49-5251-1581-30   [mlangham@sundn.de - http://www.sundn.de]
=================================================================


------------------------------------------------------------------------------------------
...this mail was scanned for viruses by mailserver...

Mime
View raw message