Re: [xsl] Replace content of element, then transform it...
2012-08-30 11:57:50
Trond,
Yes, Firefox is a good example of a problematic case since its processor
transforms the tree and then treats it directly as an HTML DOM for
display. In other words, no serialization, and no parsing after the
initial parse of the XML. So there is no opportunity to disable output
escaping (no output of this sort to escape), and hence no d-o-e.
(In contrast, it appears that IE asks MSXML to transform and then
serialize the transformation results, then pass that character stream to
its HTML parser -- so d-o-e works in IE. Whether you think this is good
or bad, it's confusing.)
I'm sure that other contributors can remark on other browsers and
environments. The takeaway is that the architecture is everything, and
for the sake of sanity if nothing else you want to avoid boundary
violations (as Mike said) such as the one between XML
parsing/serialization and XSLT tree transformation.
One possible approach would be to run all your input through an initial
process that would parse and rewrite it to disk, with output escaping
disabled. Then when parsing it again you would have everything in your
tree. Thus you'd reduce your problem to (a) catching and handling
pseudo-markup in the input that wasn't (pseudo) well-formed, and (b)
managing tagging semantics and vocabulary clashes in your mixed markup.
But maybe you already have namespaces to help with that problem (which
is a problem anyway).
Good luck,
Wendell
--
======================================================================
Wendell Piez
mailto:wapiez(_at_)mulberrytech(_dot_)com
Mulberry Technologies, Inc. http://www.mulberrytech.com
17 West Jefferson Street Direct Phone: 301/315-9635
Suite 207 Phone: 301/315-9631
Rockville, MD 20850 Fax: 301/315-8285
----------------------------------------------------------------------
Mulberry Technologies: A Consultancy Specializing in SGML and XML
======================================================================
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--
<Prev in Thread] |
Current Thread |
[Next in Thread>
|
- [xsl] Replace content of element, then transform it..., trond.huso
- Re: [xsl] Replace content of element, then transform it..., Martin Honnen
- Re: [xsl] Replace content of element, then transform it..., Michael Kay
- RE: [xsl] Replace content of element, then transform it..., trond.huso
- Re: [xsl] Replace content of element, then transform it..., Wendell Piez
- RE: [xsl] Replace content of element, then transform it..., trond.huso
- Re: [xsl] Replace content of element, then transform it...,
Wendell Piez <=
- RE: [xsl] Replace content of element, then transform it..., trond.huso
- Re: [xsl] Replace content of element, then transform it..., Wendell Piez
|
|
|