Salve a tutti.. Premetto che sono in crisi totale e che sono agli inizi x quanto riguarda xsl.
Vorrei un consiglio su come approciarmi ad un progetto abbastanza incasinato.
In pratica dovrei prendere 3 xml da tre sorgenti diversi e attraverso xsl catturare i dati e riorganizzarli in un unico xml "standard".
Il problema sorge dal fatto che innanzitutto sono 3 xml estremamente diversi, e che in uno in particolare ho delle difficoltà ad estrarre i dati perchè tutte le informazioni non sono mai tra i nodi ma dentro agli attributi. Ve ne incollo una porzione; come riesco a ricavare ad esempio l'attributo ID del nodo glf/listings/programs/p/f e inserirlo tra x esempio 2 nuovi tag xml?
codice:
<?xml version="1.0" encoding="UTF-8"?>
<glf lang="en-US" supplier="mstv" xmlns="http://tvservices.microsoft.com/epg/glf">
<listings>
<schedules>
<s s="2003-01-11T11:00:00" d="86400" p="327375" c="327375"/>
<s s="2003-01-11T11:00:00" d="86400" p="327376" c="327376"/>
</schedules>
<programs>
<p id="327375" t="La 7" rt="La 7" d="La 7: programmazione standard." rd="La 7: programmazione standard." l="it-IT">
<f id="5" />
<k id="100" v="MV-N" />
<!-- r is role id. First value, o defines the order it appears in the listing of similar r values. This allows big name actors to appear before lesser stars in the listings.
r Is the role type, defined in roles section. r 2 means Director.
n is the name value, defined in the Names section. This one is Jaques Cousteau. -->
</p>
<p id="327376" t="Class News" rt="Class News" d="Class News: Le notizie di Class." rd="Class News: Le notizie di Class." l="it-IT">
<f id="5" />
<k id="100" v="MV-A" />
<!-- r is role id. First value, o defines the order it appears in the listing of similar r values. This allows big name actors to appear before lesser stars in the listings.
r Is the role type, defined in roles section. r 2 means Director.
n is the name value, defined in the Names section. This one is Jaques Cousteau. -->
</p>
</programs>
</glf>
L'ideale comunque sarebbe prendere questi 3 files e produrre fisicamente un nuovo file xml facendo prima una standardizzazione e poi un join dei dati. Immagino che con solo xsl non sia possibile farlo. Ma allora come dovrei muovermi? Che cosa mi consigliate di usare? Qualcuno ha mai affrontato un problema simile?
Vi prego aiutatemi!