Use exsl to get attribute value template from source xml
This is an open discussion with no replies, filed under XSLT.
Search
Create an account or sign in to comment.
This is an open discussion with no replies, filed under XSLT.
Create an account or sign in to comment.
Quick Links
Symphony • Open Source XSLT CMS
--with-xsl
)
I had read this oldie-but-goodie article a while ago about using xsl to create your own template language, but I'm just getting around to implementing it. Using exslt, this idea is even easier. Here is how to process attribute value templates you've put in your source xml using the evaulate() function.
So source xml element like this:
will output as
First, be sure to add the appropriate @s in your xsl stylesheet/transform element:
Then you can create a catch-all template match on attributes:
Keep in mind this will be checking all your attributes, so I guess it would be more efficient to add another xpath predicate to specify a namespace or other context.