Opposite of string()
Is there a way to do the opposite of the string() function? I want to parse a string into additional source nodes to be processed. I know for the output tree I can do value-of with disable-output-escaping set to yes. But that will not run template rules on the resultant nodes.
A lot of markup languages will have something akin to a description or documentation tag with a text or CDATA as content (a lot of RSS feeds do this). But the actual text will "look like" well-formed markup, say XHTML, that is meant to be eventually be rendered for presentation.
I want to do a little bit more processing on this "markup disguised as text" than just outputting it verbatim. Like maybe force hyperlinks to open in a new window, or attribute images so they can't be bigger than a certain size, etc.
XSLT already has a document() function, so if parsing an entire additional file of markup is no big deal, then how much harder could it be to parse a string snippet?
|