Subject: Re: [xsl] Reading two xmls and changing the attribute names in the first xml conditionally From: "Joris Gillis" <roac@xxxxxxxxxx> Date: Wed, 06 Jul 2005 13:19:56 +0200 |
I have one more question regarding this problem only.
If I don't have the Type attribute for the first xml, is it possible to add the type
attribute to the nodes based on the node name like...if node name is A, then type="AGroup".
All depends on this element: <xsl:with-param name="Type" select="@Type"/>
Change this to: <xsl:with-param name="Type"> <xsl:choose> <xsl:when test="@Type"><xsl:value-of select="@Type"/></xsl:when> <xsl:otherwise> <xsl:value-of select="substring(local-name(),1,1)"/> <xsl:text>Group</xsl:text> </xsl:otherwise> </xsl:choose> </xsl:with-param>
<xsl:value-of select="substring(local-name(),1,1)"/> <xsl:text>Group</xsl:text>
Then after adding the node, I have to map the attributes based on the second xml.I'm unsure whether you're addressing the (imaginary) workflow of the xslt algorithm or real changes in the input XML document. In the latter case, you'll need some extension function to produce multiple ouput documents.
regards, -- Joris Gillis (http://users.telenet.be/root-jg/me.html) Spread the wiki (http://www.wikipedia.org)
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Reading two xmls and chan, Lakshmi narayana | Thread | Re: [xsl] Reading two xmls and chan, jeb501 |
Re: [xsl] Content in html tags, Joris Gillis | Date | Re: [xsl] Reading two xmls and chan, Joris Gillis |
Month |