RE: How to use two xmls for comparing and extracting v
Hi, > I am extremely sorry for writing incorrect desired output. > Actually i would like to have output like > `val1'val2 > > I am having input file having node like this > <Root att1="val1" and att2="val2". > > I am having the intermediate file which i constructed from > input file havin > structure. > > <Table Name="Root"> > <Column name="att1"/> > <Column name="att2"/> > > Now i would like to have output like > `val1`val2 > > <xsl:variable name="Schema" select="document('colHeader.xml')"/> > > In the Schema variable I am having the document root of the > intermediate file. > > I am trying to compare name of the attribute of the Root node > against the > value of the Column's naame attribute and if they are equal > then outputting > the value of the attribute of the Root node. E.g. <xsl:variable name="root" select="Root"/> <xsl:for-each select="$Schema/Table/Column"> <xsl:variable name="name" select="@name"/> <xsl:if test="$root/@*[name() = $name]"> <xsl:text>`</xsl:text> <xsl:value-of select="$root/@*[name() = $name]"/> </xsl:if> </xsl:for-each> but somehow I have this feeling it's not what you're asking for. Anyhow, do you have to have the intermediate document, do you need other than in this later transformation? Cheers, Jarno - Assemblage 23: Awake (Imperative Reaction Mix - 138 BPM) 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