XSLT document() function with escaped chars in file name -


am parsing xml file names escaped characters. file name on server:
account-v%29%27%22%3b%3a%3e.layout

when apply document function, automatically transforming escaped characters.

`<xsl:apply-templates select="document('account-v%29%27%22%3b%3a%3e.layout')/layout"/> 

the above yields error cannot find file on server:
account-v)'";:>.layout

is there way tell document() function not transform escaped chars in file? tried wrapping around variables did not work.

if you're using xslt 2.0, try using encode-for-uri()

select="document(encode-for-uri('account-v%29%27%22%3b%3a%3e.layout'))/layout" 

Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -