I need to unescape XML characters from inside of XML nodes with the help of only XSLT transformations. I have <text><>and other possible characters</text>
and need to get it as valid formatted HTML when I place it inside of the body tag.
相关问题
- Illegal to have multiple roots (start tag in epilo
- Newtonsoft DeserializeXNode expands internal array
- how to use special characters like '<'
- XML - XSLT - document() function inside count() fu
- convert logback.xml to log4j.properties
相关文章
- Creating XML Elements without namespace declaratio
- Get Attribute Value From Simple XML Using JQuery /
- Directly signing an Office Word document using XML
- When sending XML to JMS should I use TextMessage o
- Fragment Content Overlaps Toolbar and Bottom Navig
- Getting “Error: Missing Constraints in ConstraintL
- xslt localization
- Upgrading transaction.commit_manually() to Django
I haven't found an answer to this question. So I came to the conclusion that this is no way to do this. I found workaround for this problem, unescaping file on server side.
Another solution. This one does not use the xml postprocessor, so readily useable as input of further xslt processing. Also guaranteed to create valid xml. This is a xslt 2.0 solution, escaping text within "documentation" tags, tested with saxon. You should modify the "allowedtags" variable to define your own data model. The immediate children are the tags, the ones below them are the attributes possible. Reading the allowed tags from an xsd is left as an excercise for the reader (please share it with me).
With xslt 2.0 I have come up with this one. Note that the output is not guaranteed to be correct xml, a simple unequality can mess up your output.
Note that the output is not guaranteed to be well-formed XML anymore.