[Aufgaben] XML Aufgaben hinzufügen
Die Aufgaben zu XML wurden hinzugefügt.
This commit is contained in:
parent
5e41b6dfac
commit
90bcc2ee19
5 changed files with 120 additions and 0 deletions
25
Aufgaben/2017_06_06_XML/CD_Katalog.xml
Normal file
25
Aufgaben/2017_06_06_XML/CD_Katalog.xml
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!DOCTYPE katalog [
|
||||||
|
<!ELEMENT katalog (cd)+>
|
||||||
|
<!ELEMENT cd (titel, interpret)>
|
||||||
|
<!ELEMENT titel (#PCDATA)>
|
||||||
|
<!ELEMENT interpret (#PCDATA)>
|
||||||
|
]>
|
||||||
|
<katalog>
|
||||||
|
<cd>
|
||||||
|
<titel>Godiva</titel>
|
||||||
|
<interpret>Heaven Shall Burn</interpret>
|
||||||
|
</cd>
|
||||||
|
<cd>
|
||||||
|
<titel>Ohne Dich</titel>
|
||||||
|
<interpret>Rammstein</interpret>
|
||||||
|
</cd>
|
||||||
|
<cd>
|
||||||
|
<titel>Mutter</titel>
|
||||||
|
<interpret>Rammstein</interpret>
|
||||||
|
</cd>
|
||||||
|
<cd>
|
||||||
|
<titel>Radio/Video</titel>
|
||||||
|
<interpret>System of a Down</interpret>
|
||||||
|
</cd>
|
||||||
|
</katalog>
|
26
Aufgaben/2017_06_06_XML/CD_Katalog.xsl
Normal file
26
Aufgaben/2017_06_06_XML/CD_Katalog.xsl
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||||
|
<xsl:template match="/">
|
||||||
|
<html>
|
||||||
|
<head> <title>Mein Katalog</title> </head>
|
||||||
|
<body>
|
||||||
|
<xsl:attribute name="bgcolor">
|
||||||
|
<xsl:value-of select="/katalog/farbe"/>
|
||||||
|
</xsl:attribute>
|
||||||
|
<h2>CD-Katalog</h2>
|
||||||
|
<table border="1">
|
||||||
|
<tr bgcolor="white">
|
||||||
|
<th>Titel</th> <th>Interpret</th>
|
||||||
|
</tr>
|
||||||
|
<xsl:for-each select="/katalog/cd">
|
||||||
|
<xsl:sort select="interpret"/>
|
||||||
|
<tr>
|
||||||
|
<td><xsl:value-of select="titel"/></td>
|
||||||
|
<td><xsl:value-of select="interpret"/></td>
|
||||||
|
</tr>
|
||||||
|
</xsl:for-each>
|
||||||
|
</table>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
</xsl:template>
|
||||||
|
</xsl:stylesheet>
|
13
Aufgaben/2017_06_06_XML/CD_Katalog_Basic.xsl
Normal file
13
Aufgaben/2017_06_06_XML/CD_Katalog_Basic.xsl
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||||
|
<xsl:template match="/">
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Mein Katalog</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h1>Mein CD Katalog</h1>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
</xsl:template>
|
||||||
|
</xsl:stylesheet>
|
28
Aufgaben/2017_06_06_XML/CD_Katalog_fuer_XSLT.xml
Normal file
28
Aufgaben/2017_06_06_XML/CD_Katalog_fuer_XSLT.xml
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!DOCTYPE katalog [
|
||||||
|
<!ELEMENT katalog (farbe, (cd)+)>
|
||||||
|
<!ELEMENT cd (titel, interpret)>
|
||||||
|
<!ELEMENT titel (#PCDATA)>
|
||||||
|
<!ELEMENT farbe (#PCDATA)>
|
||||||
|
<!ELEMENT interpret (#PCDATA)>
|
||||||
|
]>
|
||||||
|
<?xml-stylesheet type="text/xsl" href="CD_Katalog.xsl"?>
|
||||||
|
<katalog>
|
||||||
|
<farbe>#abcdef</farbe>
|
||||||
|
<cd>
|
||||||
|
<titel>Godiva</titel>
|
||||||
|
<interpret>Heaven Shall Burn</interpret>
|
||||||
|
</cd>
|
||||||
|
<cd>
|
||||||
|
<titel>Ohne Dich</titel>
|
||||||
|
<interpret>Rammstein</interpret>
|
||||||
|
</cd>
|
||||||
|
<cd>
|
||||||
|
<titel>Mutter</titel>
|
||||||
|
<interpret>Rammstein</interpret>
|
||||||
|
</cd>
|
||||||
|
<cd>
|
||||||
|
<titel>Radio/Video</titel>
|
||||||
|
<interpret>System of a Down</interpret>
|
||||||
|
</cd>
|
||||||
|
</katalog>
|
28
Aufgaben/2017_06_06_XML/CD_Katalog_fuer_XSLT_Basic.xml
Normal file
28
Aufgaben/2017_06_06_XML/CD_Katalog_fuer_XSLT_Basic.xml
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!DOCTYPE katalog [
|
||||||
|
<!ELEMENT katalog (farbe, (cd)+)>
|
||||||
|
<!ELEMENT cd (titel, interpret)>
|
||||||
|
<!ELEMENT titel (#PCDATA)>
|
||||||
|
<!ELEMENT farbe (#PCDATA)>
|
||||||
|
<!ELEMENT interpret (#PCDATA)>
|
||||||
|
]>
|
||||||
|
<?xml-stylesheet type="text/xsl" href="CD_Katalog_Basic.xsl"?>
|
||||||
|
<katalog>
|
||||||
|
<farbe>#abcdef</farbe>
|
||||||
|
<cd>
|
||||||
|
<titel>Godiva</titel>
|
||||||
|
<interpret>Heaven Shall Burn</interpret>
|
||||||
|
</cd>
|
||||||
|
<cd>
|
||||||
|
<titel>Ohne Dich</titel>
|
||||||
|
<interpret>Rammstein</interpret>
|
||||||
|
</cd>
|
||||||
|
<cd>
|
||||||
|
<titel>Mutter</titel>
|
||||||
|
<interpret>Rammstein</interpret>
|
||||||
|
</cd>
|
||||||
|
<cd>
|
||||||
|
<titel>Radio/Video</titel>
|
||||||
|
<interpret>System of a Down</interpret>
|
||||||
|
</cd>
|
||||||
|
</katalog>
|
Loading…
Reference in a new issue