Subject: RE: [xsl] xml2xml problem! From: "Michael Kay" <mhkay@xxxxxxxxxxxx> Date: Wed, 8 Aug 2001 09:38:42 +0100 |
> > ********************* 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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] xml2xml problem!, Michael Kay | Thread | RE: [xsl] xml2xml problem!, Jarno . Elovirta |
RE: [xsl] Problem with xsl:choose, Ben Robb | Date | RE: [xsl] format-number alternative, Michael Kay |
Month |