Home > Net >  XSLT - Combining Information from different Elements/Nodes
XSLT - Combining Information from different Elements/Nodes

Time:08-12

I have a project that I'm working on to learn XML and after trying multiple times and searching for answers online I reached a dead-end.

I have an easy XML:

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" version ="1.0" href='Information Management Project 2.xsl'?>
<task1>
    <normlist>
        <norm>
            <normID>1</normID>
            <name>EN ISO 13857</name>
            <keywords>Security</keywords>
            <keywords>Engines</keywords>
            <replacement />
        </norm>
        <norm>
            <normID>2</normID>
            <name>EN ISO 13849-1</name>
            <keywords>Security</keywords>
            <keywords>Engines</keywords>
            <keywords>Controlling</keywords>
            <replacement>1</replacement>
        </norm>
    </normlist>
    <puplicationlist>
        <title>
            <name>Norms for Engine Security</name>
            <filename>caise2011sgln.pfd</filename>
            <normIDREFS>1 2</normIDREFS>
        </title>
        <title>
            <name>Setting up Complex Engines</name>
            <filename>coopis2012sln.pdf</filename>
            <normIDREFS>2</normIDREFS>
        </title>
    </puplicationlist>
</task1>

Now I need to come up with an XSLT that shows the following: The first column contains the norm name, the second column contains the file names of the publications referring to the norm.

Something like that:enter image description here

  • Related