Hallo, ik ben bezig om een pagina te maken met veel links, dit wil ik doen doormiddel van XML met een structuur met de volgende indeling:
ik heb het volgende in de xls staan:
Probleem is nu: hoe lees in de attribuut uit. Ik dacht eerst dat het ietsvan link.location was of link(location), maar dit is het niet. Wat wel?
code:
1
2
3
4
5
6
7
| <?xml version="1.0" encoding="ISO-8859-1"?> <PAGE> <LINK location="http://www.geocities.com/Area51/Rampart/4537/st10late.html" extension="tip">New Star Trek series V news</LINK> <LINK location="http://www.greatlink.org">The Great Link</LINK> <LINK location="http://www.section31.com" extension="tip">Section 31</LINK> </PAGE> |
ik heb het volgende in de xls staan:
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
| <?xml version="1.0"?>
<HTML xmlns:xsl="http://www.w3.org/TR/WD-xsl">
<BODY STYLE="font-family:Arial, helvetica, sans-serif; font-size:12pt;
background-color:#EEEEEE">
<xsl:for-each select="page">
<xsl:element name="a">
<xsl:attribute name="href">
<xsl:value-of select="link" />
</xsl:attribute>
<xsl:value-of select="location" />
</xsl:element><br />
</xsl:for-each>
</BODY>
</HTML> |
Probleem is nu: hoe lees in de attribuut uit. Ik dacht eerst dat het ietsvan link.location was of link(location), maar dit is het niet. Wat wel?