xslkey

XSLT external lookup table correct usage - key() function?

Hello, I have searched around and found some tutorials for xsl:key and key() function, but somehow I still am missing some understanding apparently. There is a XML-XML transformation I need to do, which includes some 10 fields where you I have to take string values from source XML, find appropriate numeric codes from appropriate lookup...

Nesting of xsl:key() within xsl:key() & combining results of xsl:key()

Hi all, I have 2 unrelated questions. I need to do a grouping of data using XSLT. I need this to function like how a nested IF within an IF would function. After which, I need to group the data so that I can split it into multiple files according to the Group condition. Using XSLT Version 1.0 : Q1) How do you nest a key() within anoth...

Finding Specific Descendant Nodes With XSL:Key

Given the following code: <database> <table name="table1"> <column name="id"/> <column name="created_at"/> </table> <table name="table2"> <column name="id"/> <column name="updated_at"/> </table> </database> I want to be able to test using an xsl:key if specific table has a specific column by...

Counting distinct items in XSLT and listing only once

I have the following XML: <assessment> <section> <item> <attributes> <variables> <variable> <variable_name value="MORTIMER"/> </variable> </variables> </attributes> </item> <item> ...

Using two elements for xsl:key key

I know that if I have an XML file like this: <persons> <class name="English"> <person name="Tarzan" id="050676"/> <person name="Donald" id="070754"/> <person name="Dolly" id="231256"/> </class> <class name="Math"> <person name="Winston" id="050677"/> <person name="Donald" id="070754"/> ...

Name of iteration variable in xsl:for-each on xsl:key in XSLT 1.0

I have XSLT 1.0 code like this: <xsl:key name="enemyItems" match="metadata[attributes/metadata_key/@value = 'enemylist']" use="attributes/metadata_refkey/@value"/> <xsl:template match="item"> <xsl:variable name="enemyList" select="key('enemyItems', @key)/attributes/@value"/> <xsl:if test="str...