To XML med en XSL fil
Kære Eksperter,Jeg er kommet i et lille problem. Skal bruge data fra to XML-filer, som med XSL skal samles til output på en enkelt side.
Min kode nu er som følger:
<?xml version="1.0" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
-------FØRSTE XML-FIL----------
<div id="TopRightMenu">
<div style="background-color: #162C68; color: #ffffff; text-decoration: bold; height: 20px; align: center;">
<p style="margin-left: 10px; margin-top: 3px">
<b>Kundebetjeningen</b>
</p>
</div>
<div style="background-color: #F6F6F6; color: #162C68; height: 100px; border-bottom: 1px solid #162C68;">
<p class="nyhedsboks">
<b>Kundebetjening</b>
<br />
<xsl:for-each select="data/kundedriften">
<xsl:value-of select="kundebetjeningen" />
</xsl:for-each>
<br /><br />
<b>Telestat</b><br />
<xsl:for-each select="data/kundedriften">
<xsl:value-of select="telestat" />
<a href="">Online Telestat</a>
</xsl:for-each>
<br /><br />
<b>It-drift</b><br />
<xsl:for-each select="data/kundedriften">
<xsl:value-of select="it" />
<a href="">IT-driftsbillede</a>
</xsl:for-each>
<br /><br />
</p>
</div>
</div>
<div style="height: 10px;">
</div>
-------- HER STARTER ANDEN FIL------------
<div id="BottomRightMenu">
<div style="background-color: #162C68; color: #ffffff; text-decoration: bold; height: 20px; align: center;">
<p style="margin-left: 10px; margin-top: 3px"><b>Vigtige nyheder</b></p>
</div>
<div style="background-color: #F6F6F6; color: #162C68; height: 180px; border-bottom: 1px solid #162C68;">
<xsl:for-each select="data/nyheder/nyhed">
<xsl:if test="@forside='yes'">
<xsl:if test="@type='kunde'">
<a>
<xsl:attribute name="href">
<xsl:value-of select="link" />
</xsl:attribute>
<xsl:value-of select="overskrift" />
</a>
<br />
<xsl:value-of select="tekst" />
<br />
<hr />
</xsl:if>
</xsl:if>
</xsl:for-each>
<xsl:for-each select="data/nyheder/nyhed">
<xsl:if test="@forside='yes'">
<xsl:if test="@type='org'">
<a>
<xsl:attribute name="href">
<xsl:value-of select="link" />
</xsl:attribute>
<xsl:value-of select="overskrift" />
</a>
<br />
<xsl:value-of select="tekst" />
<br />
<hr />
</xsl:if>
</xsl:if>
</xsl:for-each>
<a href="Nyhedsarkiv">Nyhedsarkiv</a>
</div>
<div style="height: 10px;">
</div>
<div style="background-color: #162C68; color: #ffffff; text-decoration: bold; height: 20px; align: center;">
<p style="margin-left: 10px; margin-top: 3px"><b>Kontakt Kundeservice</b></p>
</div>
-------------FØRSTE FIL IGEN-------------
<div style="margin-top: 2px;">
<xsl:for-each select="data/maillink">
<a>
<xsl:attribute name="href">
<xsl:value-of select="link" />
</xsl:attribute>
<xsl:value-of select="overskrift" />
</a>
<br />
</xsl:for-each>
<hr />
</div>
</div>
</xsl:template>
</xsl:stylesheet>