Timeline for XSLT converts <image> node to <img> tag when outputiing to DOM
Current License: CC BY-SA 4.0
9 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Apr 11 at 13:50 | comment | added | Glenn Carver | Can you check out this question as well? Now <param> node is acting out the same way <image> did stackoverflow.com/questions/78310819/… | |
Apr 3 at 11:33 | vote | accept | Glenn Carver | ||
Apr 3 at 11:33 | comment | added | Glenn Carver | My man this is EXACTLY what I was looking for. It is perfect! This should be the answer | |
Apr 3 at 11:29 | history | edited | Martin Honnen | CC BY-SA 4.0 |
adding sample showing that XML source in an HTML script element survives HTML parsing and can be parsed as XML afterwards by JavaScript/DOMParser
|
Apr 3 at 11:13 | comment | added | Martin Honnen |
It is possible to stuff XSLT/XML source code into an HTML <script type="application/xml"><object><image></image></object></script> element and read out the source XML/XSLT from the script element's .text property. That way to XML/XSLT source code is untouched/preserved.
|
|
Apr 3 at 11:06 | comment | added | Glenn Carver | I suppose. Is there any other way to expose XML file that only exists within XSLT framework to javascript on the webpage it generates otherwise? | |
Apr 3 at 10:55 | comment | added | Martin Honnen | Treat/parse XML as XML, don't parse it as HTML or stuff it into an HTML DOM. | |
Apr 3 at 10:34 | comment | added | Glenn Carver | VERY interesting. So it's not XSLT, and not JS as well (I disabled JS in browser to test my code) So I guess it's a thing that browsers do? And there is no workaround but to ask backend guys to change nodename to something like "picture" instead of "image" ? | |
Apr 3 at 10:06 | history | answered | Martin Honnen | CC BY-SA 4.0 |