Subject: RE: Styling xml values into xml namespace tags From: "Kevin Jones" <kjouk@xxxxxxxxxxx> Date: Wed, 8 Nov 2000 11:07:05 -0000 |
> > I'd like to know if, when styling an xml into another xml format, it is > possible to use a value from the first to generate a node in the second > in the format of a valid namespace (ie. defined at the top of the xml). > > For example if I want to use the type attribute as part of the namespace > in the output xml (assuming it was referenced in the second xml as a > valid namespace ie xmlns:Book="http://www.examples.eg">): > > If the first xml looked similar to. > > // > > <entry Id="111766" type="Book"> > <title>The Hobbit</title> > <description>Fantasy</description> > </entry> > > // > > Could it be output as: > > <label:Book> > <name>The Hobbit</name> > <description>Fantasy</description> > </label:Book> > I think you can do what you are asking with an xsl-element. Assuming label is a namespace defined in your stylesheet. <xsl:element name="label:{@type}"> <name><xsl:value-of select="title"/></name> <description><xsl:value-of select="description"/></description> </xsl:element> Kev. _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: Styling xml values into xml nam, Miloslav Nic | Thread | Re: Styling xml values into xml nam, Jeni Tennison |
RE: getting parents position, Kevin Jones | Date | RE: Efficient Stylesheets for reord, Kay Michael |
Month |