|
Registriert seit: 26. Jul 2002 Ort: Sachsen 1.198 Beiträge Delphi XE5 Professional |
#2
Also da sich niemand an dieses Thema getraut hat, habe ich nun die XML-Datei eingelesen und Creiere daraus eine eigene kleiere Datei. Mit dieser Datei habe ich aber trotzdem noch immer das Problem der Darstellung per XSL. Ich bekomme es zwar hin, aber nicht wirklich DYNAMISCH.
Wie ich das meine? Ok, in der XML-Datei findet man nun die Court und dazu die dort stattfindenen Spiele. In der XSL schaffe ich es einfach nicht diese Courts dynamisch anzuzeigen. Also wenn nur auf Court 1 und 3 gespielt wird, sollen auch nur 2 Tabellen angezeigt werden. Die Aufgabe hat sich also um einiges vereinfacht, aber ich bekomme es einfach nicht hin. Wo fehlts da? XML-Content:
Delphi-Quellcode:
XSL-Content:
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="matches.xsl" ?> <?xml-stylesheet type="text/css" href="index.css" ?> <glossar> <court> <eintrag id="1"> <DateSeq>2</DateSeq> <MatchNo>21</MatchNo> <NumSets>3</NumSets> <Player1>74c8a1dd-9332-40dc-959b-f6500ef8897c</Player1> <Player1a>00000000-0000-0000-ffff-000000000000</Player1a> <Player2>7a07a4f3-c450-48be-b859-63dc90a11781</Player2> <Player2a>00000000-0000-0000-ffff-000000000000</Player2a> <OfficialId>e73eded0-6917-42d8-b8bb-8ac4d0bf4ce0</OfficialId> <CourtId>1</CourtId> <Winner>1</Winner> <LongScore>6/4 4/6 6/3</LongScore> <npA>Guez David</npA> <npA2></npA2> <npB>di Mauro Alessio</npB> <npB2></npB2> <Country1>FRA</Country1> <Country1a></Country1a> <Country2>ITA</Country2> <Country2a></Country2a> <CountryOff></CountryOff> <EventId>3</EventId> <IsDoubles></IsDoubles> </eintrag> <eintrag id="1"> <DateSeq>2</DateSeq> <MatchNo>22</MatchNo> <NumSets>3</NumSets> <Player1>7f1c5ab7-622c-4dda-81fb-52371bb162ce</Player1> <Player1a>00000000-0000-0000-ffff-000000000000</Player1a> <Player2>b933a05e-8f04-41b1-84a2-7b794bfa5846</Player2> <Player2a>00000000-0000-0000-ffff-000000000000</Player2a> <OfficialId>a3ee2e72-25c7-40ef-a919-3d52924a673a</OfficialId> <CourtId>1</CourtId> <Winner>2</Winner> <LongScore>6/2 6/4</LongScore> <npA>Llodra Michael</npA> <npA2></npA2> <npB>Luzzi Federico</npB> <npB2></npB2> <Country1>FRA</Country1> <Country1a></Country1a> <Country2>ITA</Country2> <Country2a></Country2a> <CountryOff></CountryOff> <EventId>3</EventId> <IsDoubles></IsDoubles> </eintrag> <eintrag id="1"> <DateSeq>2</DateSeq> <MatchNo>26</MatchNo> <NumSets>3</NumSets> <Player1>c5c897d4-5c0a-4851-86a8-8849368eb628</Player1> <Player1a>00000000-0000-0000-ffff-000000000000</Player1a> <Player2>ea151437-3427-40c7-ad20-2bc88272d99d</Player2> <Player2a>00000000-0000-0000-ffff-000000000000</Player2a> <OfficialId>20d9aadd-cb1c-4fb3-96f2-bd3a28a360eb</OfficialId> <CourtId>1</CourtId> <Winner>1</Winner> <LongScore>7/6(7/4) 2/6 7/5</LongScore> <npA>Roitman Sergio</npA> <npA2></npA2> <npB>Lisnard Jean-Rene</npB> <npB2></npB2> <Country1>ARG</Country1> <Country1a></Country1a> <Country2>MON</Country2> <Country2a></Country2a> <CountryOff>Dercq Jean-Philippe</CountryOff> <EventId>3</EventId> <IsDoubles></IsDoubles> </eintrag> <eintrag id="1"> <DateSeq>2</DateSeq> <MatchNo>29</MatchNo> <NumSets>3</NumSets> <Player1>14d661c4-66b8-42ef-aec4-c5b2bc3ca8b1</Player1> <Player1a>00000000-0000-0000-ffff-000000000000</Player1a> <Player2>031c5131-90b3-476b-af16-4e0ffb051587</Player2> <Player2a>00000000-0000-0000-ffff-000000000000</Player2a> <OfficialId>975617c8-12fe-44fc-b969-bb682f0b15be</OfficialId> <CourtId>1</CourtId> <Winner>2</Winner> <LongScore>6/3 6/2</LongScore> <npA>Eysseric Jonathan</npA> <npA2></npA2> <npB>Pavel Andrei</npB> <npB2></npB2> <Country1>FRA</Country1> <Country1a></Country1a> <Country2>ROU</Country2> <Country2a></Country2a> <CountryOff></CountryOff> <EventId>3</EventId> <IsDoubles></IsDoubles> </eintrag> </court> <court> <eintrag id="2"> <DateSeq>2</DateSeq> <MatchNo>19</MatchNo> <NumSets>3</NumSets> <Player1>9ca5e191-0922-4521-b8bc-8444b6411bc1</Player1> <Player1a>00000000-0000-0000-ffff-000000000000</Player1a> <Player2>b11c3f35-dccc-4297-9282-095678996a6f</Player2> <Player2a>00000000-0000-0000-ffff-000000000000</Player2a> <OfficialId>dc78ff2d-8dd9-4eda-b8d2-81c5bac760be</OfficialId> <CourtId>2</CourtId> <Winner>2</Winner> <LongScore>7/5 1/6 6/4</LongScore> <npA>Fraile Gorka</npA> <npA2></npA2> <npB>Seppi Andreas</npB> <npB2></npB2> <Country1>ESP</Country1> <Country1a></Country1a> <Country2>ITA</Country2> <Country2a></Country2a> <CountryOff>Dumusois Damien</CountryOff> <EventId>3</EventId> <IsDoubles></IsDoubles> </eintrag> <eintrag id="2"> <DateSeq>2</DateSeq> <MatchNo>23</MatchNo> <NumSets>3</NumSets> <Player1>16ac28f7-b261-41fb-993b-a03c42307cc5</Player1> <Player1a>00000000-0000-0000-ffff-000000000000</Player1a> <Player2>4b59fa24-f0f6-491a-8210-01d13b8ec894</Player2> <Player2a>00000000-0000-0000-ffff-000000000000</Player2a> <OfficialId>ce71ba19-70c4-4f9f-ad71-736ec42921e6</OfficialId> <CourtId>2</CourtId> <Winner>2</Winner> <LongScore>6/2 6/3</LongScore> <npA>Fognini Fabio</npA> <npA2></npA2> <npB>Galvani Stefano</npB> <npB2></npB2> <Country1>ITA</Country1> <Country1a></Country1a> <Country2>ITA</Country2> <Country2a></Country2a> <CountryOff>Thiemann Michael</CountryOff> <EventId>3</EventId> <IsDoubles></IsDoubles> </eintrag> <eintrag id="2"> <DateSeq>2</DateSeq> <MatchNo>27</MatchNo> <NumSets>3</NumSets> <Player1>7fa01731-af7f-4121-8794-9d9ed342a07f</Player1> <Player1a>00000000-0000-0000-ffff-000000000000</Player1a> <Player2>a1632ec1-decd-4abe-937a-dedf7c93f7a3</Player2> <Player2a>00000000-0000-0000-ffff-000000000000</Player2a> <OfficialId>04484905-52ab-41d4-b374-f1ecf638c2be</OfficialId> <CourtId>2</CourtId> <Winner>2</Winner> <LongScore>6/3 3/6 6/3</LongScore> <npA>Roger-Vasselin Edouard</npA> <npA2></npA2> <npB>Kunitsyn Igor</npB> <npB2></npB2> <Country1>FRA</Country1> <Country1a></Country1a> <Country2>RUS</Country2> <Country2a></Country2a> <CountryOff>Stellabotte Nicholas</CountryOff> <EventId>3</EventId> <IsDoubles></IsDoubles> </eintrag> <eintrag id="2"> <DateSeq>2</DateSeq> <MatchNo>28</MatchNo> <NumSets>3</NumSets> <Player1>bd3b8367-18f4-4cff-a835-e45107e7c41e</Player1> <Player1a>00000000-0000-0000-ffff-000000000000</Player1a> <Player2>622fca60-51b8-453e-8926-60e32e2af642</Player2> <Player2a>00000000-0000-0000-ffff-000000000000</Player2a> <OfficialId>1b39dbf3-b5cf-4715-b9f0-a12a0c91b0b7</OfficialId> <CourtId>2</CourtId> <Winner>2</Winner> <LongScore>6/4 7/6(7/5)</LongScore> <npA>Hernandez Oscar</npA> <npA2></npA2> <npB>Haehnel Jerome</npB> <npB2></npB2> <Country1>ESP</Country1> <Country1a></Country1a> <Country2>FRA</Country2> <Country2a></Country2a> <CountryOff>Solarino Giuseppe</CountryOff> <EventId>3</EventId> <IsDoubles></IsDoubles> </eintrag> </court> <court> <eintrag id="3"> <DateSeq>2</DateSeq> <MatchNo>16</MatchNo> <NumSets>3</NumSets> <Player1>ed9a5c6e-c1e5-4b3d-a319-5450449b208e</Player1> <Player1a>00000000-0000-0000-ffff-000000000000</Player1a> <Player2>23dbabbe-8487-4ef5-a15b-51b483c08f35</Player2> <Player2a>00000000-0000-0000-ffff-000000000000</Player2a> <OfficialId>a15b1952-df2a-4d1e-b610-de5b30666f37</OfficialId> <CourtId>3</CourtId> <Winner>1</Winner> <LongScore>6/3 6/3</LongScore> <npA>Kohlschreiber Philipp</npA> <npA2></npA2> <npB>Vik Robin</npB> <npB2></npB2> <Country1>GER</Country1> <Country1a></Country1a> <Country2>CZE</Country2> <Country2a></Country2a> <CountryOff>Mourier Cedric</CountryOff> <EventId>3</EventId> <IsDoubles></IsDoubles> </eintrag> <eintrag id="3"> <DateSeq>2</DateSeq> <MatchNo>17</MatchNo> <NumSets>3</NumSets> <Player1>7ae8d8b7-71a0-4263-9217-7083cde434be</Player1> <Player1a>00000000-0000-0000-ffff-000000000000</Player1a> <Player2>913c2118-e3c9-40df-a91e-af6f95e62d02</Player2> <Player2a>00000000-0000-0000-ffff-000000000000</Player2a> <OfficialId>0b556b8a-7312-49bd-9591-390ff82aaeda</OfficialId> <CourtId>3</CourtId> <Winner>2</Winner> <LongScore>6/4 6/2</LongScore> <npA>Lorenzi Paolo</npA> <npA2></npA2> <npB>Bozoljac Ilia</npB> <npB2></npB2> <Country1>ITA</Country1> <Country1a></Country1a> <Country2>SRB</Country2> <Country2a></Country2a> <CountryOff>Zaloga Gabriela</CountryOff> <EventId>3</EventId> <IsDoubles></IsDoubles> </eintrag> <eintrag id="3"> <DateSeq>2</DateSeq> <MatchNo>24</MatchNo> <NumSets>3</NumSets> <Player1>6f8d7530-5b94-44ac-8cca-df86a72948c9</Player1> <Player1a>00000000-0000-0000-ffff-000000000000</Player1a> <Player2>e15216e5-e6e5-4567-ab3e-73319c10a0ef</Player2> <Player2a>00000000-0000-0000-ffff-000000000000</Player2a> <OfficialId>572ea728-a8be-4d6f-8182-98fe0f4abf3c</OfficialId> <CourtId>3</CourtId> <Winner>2</Winner> <LongScore>4/6 7/6(7/5) 4/1 Ret'd</LongScore> <npA>Hernych Jan</npA> <npA2></npA2> <npB>Portas Albert</npB> <npB2></npB2> <Country1>CZE</Country1> <Country1a></Country1a> <Country2>ESP</Country2> <Country2a></Country2a> <CountryOff>Leicher Mike</CountryOff> <EventId>3</EventId> <IsDoubles></IsDoubles> </eintrag> <eintrag id="3"> <DateSeq>2</DateSeq> <MatchNo>25</MatchNo> <NumSets>3</NumSets> <Player1>66c4ecf6-c5b7-47f0-aa47-76b8bde68fbd</Player1> <Player1a>00000000-0000-0000-ffff-000000000000</Player1a> <Player2>dc9bc7ad-53d8-410f-9953-d8b11648e11e</Player2> <Player2a>00000000-0000-0000-ffff-000000000000</Player2a> <OfficialId>408c8349-2ab9-44ec-af39-a59bf1e4e644</OfficialId> <CourtId>3</CourtId> <Winner>2</Winner> <LongScore>6/3 2/6 6/3</LongScore> <npA>Granollers-Pujol Marcel</npA> <npA2></npA2> <npB>Falla Alejandro</npB> <npB2></npB2> <Country1>ESP</Country1> <Country1a></Country1a> <Country2>COL</Country2> <Country2a></Country2a> <CountryOff></CountryOff> <EventId>3</EventId> <IsDoubles></IsDoubles> </eintrag> </court> <court> <eintrag id="4"> <DateSeq>2</DateSeq> <MatchNo>18</MatchNo> <NumSets>3</NumSets> <Player1>298badad-81c1-49e3-b382-24859c85709e</Player1> <Player1a>00000000-0000-0000-ffff-000000000000</Player1a> <Player2>a8bef101-76b6-4523-9c31-cb068201facc</Player2> <Player2a>00000000-0000-0000-ffff-000000000000</Player2a> <OfficialId>5f035aeb-f308-4270-9914-5e6e3653b63b</OfficialId> <CourtId>4</CourtId> <Winner>1</Winner> <LongScore>6/2 6/2</LongScore> <npA>Garcia-Lopez Guillermo</npA> <npA2></npA2> <npB>Bastl George</npB> <npB2></npB2> <Country1>ESP</Country1> <Country1a></Country1a> <Country2>SUI</Country2> <Country2a></Country2a> <CountryOff></CountryOff> <EventId>3</EventId> <IsDoubles></IsDoubles> </eintrag> <eintrag id="4"> <DateSeq>2</DateSeq> <MatchNo>20</MatchNo> <NumSets>3</NumSets> <Player1>e7281f53-17fa-4ef2-a3db-b612f87233da</Player1> <Player1a>00000000-0000-0000-ffff-000000000000</Player1a> <Player2>a3727fd7-7a5a-4f22-930d-dc1866bab4d8</Player2> <Player2a>00000000-0000-0000-ffff-000000000000</Player2a> <OfficialId>8f885e1f-4b87-40ef-af15-b8823ba9d2c6</OfficialId> <CourtId>4</CourtId> <Winner>1</Winner> <LongScore>6/3 3/6 6/4</LongScore> <npA>Gabashvili Teimuraz</npA> <npA2></npA2> <npB>Drouet Thomas</npB> <npB2></npB2> <Country1>RUS</Country1> <Country1a></Country1a> <Country2>MON</Country2> <Country2a></Country2a> <CountryOff>Gabas Arnaud</CountryOff> <EventId>3</EventId> <IsDoubles></IsDoubles> </eintrag> </court> </glossar>
Delphi-Quellcode:
<?xml version="1.0" encoding="iso-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="/"> <html> <head> <link rel="stylesheet" href="index.css" type="text/css" /> </head> <body onselectstart="return false" onDragStart="return false" onDrop="return false"> <table class="match" cellpadding="0" cellspacing="0" align="center" width="100%"> <tr><th colspan="4">Court 1</th></tr> <tr> <th class="small">No.</th> <th class="small">Player A</th> <th class="small">Player B</th> <th class="small">Result</th> </tr> <xsl:for-each select="glossar/court/eintrag"> <xsl:if test="CourtId='1'"> <tr> <td width="5%" valign="top"><xsl:value-of select="MatchNo" /></td> <td width="35%" valign="top"><xsl:value-of select="npA" /></td> <td width="35%" valign="top"><xsl:value-of select="npB" /></td> <td width="25%" valign="top"><xsl:value-of select="LongScore" /></td> </tr> <tr><td colspan="4">Umpire: <xsl:value-of select="OfficialId" /></td></tr> </xsl:if> </xsl:for-each> </table> </body> </html> </xsl:template> </xsl:stylesheet>
Danke
Tom |
![]() |
Ansicht |
![]() |
![]() |
![]() |
ForumregelnEs ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.
BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus. Trackbacks are an
Pingbacks are an
Refbacks are aus
|
|
Nützliche Links |
Heutige Beiträge |
Sitemap |
Suchen |
Code-Library |
Wer ist online |
Alle Foren als gelesen markieren |
Gehe zu... |
LinkBack |
![]() |
![]() |