[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: xml2xml problem!

Subject: RE: xml2xml problem!
From: "Michael Kay" <mhkay@xxxxxxxxxxxx>
Date: Wed, 8 Aug 2001 09:38:42 +0100
ulink 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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.