Jump to content
xisto Community
Sign in to follow this  
eiteljoh

Passing Variable To Xsl passing variable to xsl

Recommended Posts

i want a simple way to pass a variable to a xsl stylesheet. has anyone had any luck with this?i basically want to grab a variable out of the URL and use it for an xpath expression to parse out a xml doc. seems rather difficult unless you've got some heavier tools ...

Share this post


Link to post
Share on other sites

i want a simple way to pass a variable to a xsl stylesheet.  has anyone had any luck with this?

 

i basically want to grab a variable out of the URL and use it for an xpath expression to parse out a xml doc.  seems rather difficult unless you've got some heavier tools ...

<{POST_SNAPBACK}>


I am going to propose you a really not elegant solution However it maybe useful to you.

-> Grab the variable out of the URL with PHP.

-> Open the XML doc you want to parse with PHP add a line within the variable value in it.

-> Then just code your XSL to parse that variable introduced previously in the XML and use it for the xpath expression.

 

I hope i was clear enought. If not PM.

Share this post


Link to post
Share on other sites

I am going to propose you a really not elegant solution However it maybe useful to you.

-> Grab the variable out of the URL with PHP.

-> Open the XML doc you want to parse with PHP add a line within the variable value in it.

-> Then just code your XSL to parse that variable introduced previously in the XML and use it for the xpath expression.

 

I hope i was clear enought. If not PM.

<{POST_SNAPBACK}>


Yep, thanks a lot. i'll will give it a try. It's really rather challenging ... maybe someday xlst will support this kind of thing? ....

Share this post


Link to post
Share on other sites

Maybe it is supported but from my experience i do not remember it.

XSL is some tricky in the beggining but at the end after scratching your head a bit, XSL can transform almost everything.

 

Yep, thanks a lot.  i'll will give it a try.  It's really rather challenging ... maybe someday xlst will support this kind of thing? ....

<{POST_SNAPBACK}>

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.