Witam wszystkich :) piszę gdyż napotkałem na pewien problem podczas tworzenia stylów xsl, liczę na waszą pomoc poniżej
plik xml
[code]<?xml version="1.0" encoding="UTF-8"?>
<firma:firma xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schematLocation="www.polciu.com.pl. przyklad.dtd"
xmlns:firma="http://www.polciu.com.pl/">
firma:nazwa Polciu </firma:nazwa>
<firma:dyrektor imie="aaaa" nazwisko="bbbb">
<firma:wicedyrektor imie="cccc" nazwisko="ffff">
</firma:wicedyrektor>
</firma:dyrektor>
</firma:firma>[/code]
plik xsl
[code]<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:firma="http://www.polciu.com.pl/">
<xsl:template match="/">
<html>
<body>
<title>
<xsl:value-of select="firma:firma/firma:nazwa" />
</title>
<style>
body {font-family:Verdana, Arial, helvetica, sans-serif; font-size:large; }
</style>
</body>
<body style="background-color:#EEEEEE">
<xsl:value-of select="firma:firma/firma:nazwa" />
Testowa struktura firmy
</p> </span> <xsl:value-of select="firma:firma/firma:dyrektor" /> </body> </html> </xsl:template><xsl:template match="firma:dyrektor">
<SPAN STYLE="background-color:#FF5000; color:white; padding:4px">
<SPAN STYLE="font-weight:bold; color:white">
Dyrektor:
<xsl:value-of select="@imie"/> <xsl:value-of select="@nazwisko"/>
</SPAN>
</SPAN>
<xsl:apply-templates select="firma:wicedyrektor"/>
</xsl:template>
<xsl:template match="firma:wicedyrektor">
</xsl:stylesheet>
[/code]
Problem polega na tym że wyświetla mi się tylko nazwa firmy i Testowa struktura firmy na szarym tle. Nie mam pomysłu czemu nie chce pojawić się reszta. Poniżej zamieszczę jeszcze
plik dtd
[code]<!ELEMENT firma:dyrektor ( firma:wicedyrektor ) >