|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: xml2xml problem!
>
> ********************* source xml ************************
> ...
> <para>
> <mediaobject>
> <imageobject>
> <imagedata fileref="Title00.png" format="PNG"/>
> </imageobject>
> </mediaobject>
> <ulink url="http://www.hotmail.com/"></ulink></para>
> <para>
> ...
> ***************** end source xml ************************
>
> ********************* Output xml ************************
> ...
> <para>
> <ulink url="http://www.hotmail.com/">
> <imagedata fileref="Title00.png" format="PNG"/>
> </ulink>
> </para>
> <para>
> ...
> ***************** end Output xml ************************
>
>
> How is the XSL look like if i want to convert the part of
> source xml to the output xml like above ?
<xsl:template match="para">
<para>
<ulink url="{ulink/@url}">
<imagedata fileref="{mediaobject/imageobject/imagedata/@fileref}"
format="{mediaobject/imageobject/imagedata/@fileref}"/>
</ulink>
</para>
</xsl:template>
This will transform the paragraph you've shown us correctly. Of course I
have no idea if it will do anything useful with any other <para> elements,
since I've no idea what those look like.
Mike Kay
Software AG
>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








