Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Pass a value into a stylesheet
Message
De
18/07/2001 18:17:20
 
 
À
18/07/2001 13:49:51
Steve Summers
Pima County Superior Court
Tucson, Arizona, États-Unis
Information générale
Forum:
Internet
Catégorie:
XLST
Divers
Thread ID:
00532134
Message ID:
00532281
Vues:
11
>I am trying to pass a value from a control into a stylesheet. Does any body know how to do this?

I'm no expert on XSLT but, I think you can do it by running the transformation again with a different value for the desired element. For example, do a .selectSingleNode("//@order-by") and change it's .value and then .transformNode with the new value sending the results to the appropriate object on your HTML.

The following lines work for me when changing sort orders:
sortField = xmlstyle.selectSingleNode("//@order-by");
sortField.value = "newfield";
target.innerHTML = xmldata.transformNode(xmlstyle.XMLDocument);
Where xmlstyle is the id of the stylesheet which returns a table and xmldata is the source xml. HTH
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform