Ciao a tutti, sono nuovo del forum, ho un problema urgente:non riesco a configurare correttamente il file xsl in modo da rispettare il seguente ordine in output:

-titolo
-testo
-lista_numerata
-num1
-num2
-testo2
-lista_non_numerata
-punto1
-punto2
-testo3

Il problema è che il mio file xsl stampa prima tutto il testo e poi le liste, senza seguire l'ordine dell'xml.
Sappiamo che c'è qualcosa che non va nell'XSL, ma non sappiamo come modificarlo.

Qui i 3 file:

prova.xml:

codice:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE rs_lez SYSTEM "rs_lez.dtd">
<?xml-stylesheet type="text/xsl" href="test.xsl"?>
<rs_lez>
<rs_titolo>
titolo
</rs_titolo>

<rs_parag>
<rs_testo>
testo
</rs_testo>
</rs_parag>


<rs_listanum>
<rs_num>num1
</rs_num>
</rs_listanum>

<rs_listanum>
<rs_num>nume2
</rs_num>
</rs_listanum>

<rs_parag>
<rs_testo>testo2
</rs_testo>
</rs_parag>

</rs_lez>
Test.xsl:

codice:
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
	<xsl:output method="html"
            encoding="ISO-8859-1"
            indent="no"/>
  <xsl:template match="/">
		<html>

                	<body style="font-family:Arial">
                          

<xsl:value-of select="//rs_titolo"/> </p> 
						  
						  <xsl:for-each select="rs_lez/rs_parag">
						  

 
						  <xsl:value-of select="rs_testo"/>
						  </p>
							   </xsl:for-each>  
						   
						   <ul>
						   <xsl:for-each select="rs_lez/rs_lista">
						[*]
						   <xsl:value-of select="rs_punto" />
						   
						   </xsl:for-each>
						[/list]
						   
						   
  1. <xsl:for-each select="rs_lez/rs_listanum">
  2. <xsl:value-of select="rs_num" /> </xsl:for-each>
</body> </html> </xsl:template> </xsl:stylesheet>
rs_lez.dtd:

codice:
<!ELEMENT rs_lez (rs_titolo,rs_parag*,rs_testo*,rs_lista*, rs_punto*,rs_listanum*, rs_num*)>
<!ELEMENT rs_titolo (#PCDATA) >
<!ELEMENT rs_parag (rs_testo,rs_lista,rs_listanum) >
<!ELEMENT rs_testo (#PCDATA) >
<!ELEMENT rs_lista (rs_punto) >
<!ELEMENT rs_punto (#PCDATA) >
<!ELEMENT rs_listanum (rs_num) >
<!ELEMENT rs_num (#PCDATA) >
Grazie a tutti quelli che risponderanno!