why would an inline XMLNS change the entire tag structure? JSFJSF swallows closing tag after SVGXPointers in SVGSVG viewBox to VML coordorigin/coordsizeHtml, xmlns, namespaces, xmlComponent Tree not expanding when using ui:debug facelet tagJSTL <c:remove not recognizedXSLT generated SVG with right namespaceJavascript function not working inside composite control JSFhow to insert xmlns and xlink attributes into svg element/tag generated by c3 charts?How use image/svg+xml in JMeterimagemagick - convert does not work with use xlink:href in SVG - possible?

Output visual diagram of picture

Mortal danger in mid-grade literature

I keep switching characters, how do I stop?

Put the phone down / Put down the phone

PTIJ: Which Dr. Seuss books should one obtain?

Has the laser at Magurele, Romania reached the tenth of the Sun power?

Sort with assumptions

Not hide and seek

New Order #2: Turn My Way

Why doesn't Gödel's incompleteness theorem apply to false statements?

Derivative of an interpolated function

Recursively move files within sub directories

C++ lambda syntax

Reason why a kingside attack is not justified

How do you justify more code being written by following clean code practices?

Is there a distance limit for minecart tracks?

"Marked down as someone wanting to sell shares." What does that mean?

What is the purpose of using a decision tree?

Would this string work as string?

Why would five hundred and five same as one?

What properties make a magic weapon befit a Rogue more than a DEX-based Fighter?

Make a Bowl of Alphabet Soup

Why didn't Voldemort know what Grindelwald looked like?

Travelling in US for more than 90 days



why would an inline XMLNS change the entire tag structure? JSF


JSF swallows closing tag after SVGXPointers in SVGSVG viewBox to VML coordorigin/coordsizeHtml, xmlns, namespaces, xmlComponent Tree not expanding when using ui:debug facelet tagJSTL <c:remove not recognizedXSLT generated SVG with right namespaceJavascript function not working inside composite control JSFhow to insert xmlns and xlink attributes into svg element/tag generated by c3 charts?How use image/svg+xml in JMeterimagemagick - convert does not work with use xlink:href in SVG - possible?













0















My apologies in advance, i don't do a lot of front end development. But in short xmlns attributes are removing tags and moving them around in the rendered document. This is probably a JSF issue as it even happens in view source. This svg tag works and does not alter the structure:



<svg id="Layer_1" x="0px" y="0px" width="150px" height="150px" viewBox="0 0 150 150" enable-background="new 0 0 150 150">


But as soon as an xml namespace is declared, all the code on the page is altered. It moves my span tags, a tags, heading tags, removes closing div tags, and orders them in a way that just breaks everything. here is an example of the original xhtml, and rendered xhtml along with the html's xmlns



pre-jsf xhtml:



 <a href="?service=all" class="#servicesAllClass">
<span>
<svg **xmlns="http://www.w3.org/2000/svg"** id="Layer_1" x="0px" y="0px"
width="150px" height="150px" viewBox="0 0 150 150" enable-background="new 0 0 150 150">
<path fill="#3A3838" d="M126.83,8.875H22.169c-7.116,0-12.884,5.768-12.884,12.884v102.482c0,7.115,5.768,12.884,16.884,12.884
H130.83c3.116,0,8.884-5.769,8.884-12.884V21.759C139.714,14.643,133.946,8.875,126.83,8.875z M38.643,118.505
c-5.93,0-10.737-4.807-10.737-10.737c0-5.93,4.807-10.736,10.737-10.736s10.736,4.807,10.736,10.736
C49.379,113.698,44.573,118.505,38.643,118.505z M38.643,83.736c-5.93,0-10.737-4.806-10.737-10.736
c0-5.93,4.807-10.737,10.737-10.737S49.379,67.07,49.379,73C49.379,78.931,44.573,83.736,38.643,83.736z M38.643,48.969
c-5.93,0-10.737-4.807-10.737-10.737s4.807-10.736,10.737-10.736s10.736,4.806,10.736,10.736S44.573,48.969,38.643,48.969z
M112.834,45.167H68.166c-4.418,0-8-3.582-8-8s3.582-8,8-8h44.668c4.418,0,8,3.582,8,8S117.252,45.167,112.834,45.167z
M112.834,80.167H68.166c-4.418,0-8-3.581-8-8c0-4.418,3.582-8,8-8h44.668c4.418,0,8,3.582,8,8
C120.834,76.586,117.252,80.167,112.834,80.167z M112.834,115.167H68.166c-4.418,0-8-3.581-8-8s3.582-8,8-8h44.668
c4.418,0,8,3.581,8,8S117.252,115.167,112.834,115.167z"></path>
</svg>
</span>
<h5>All</h5>
</a>


This is the code after JSF when xmlns is in the tag, notice the lack of a closing anchor tag, that was not left out, its just not there. When xmlns is removed however, it is displayed exactly the same as the original (above) script, so i have opted to not include it.



DOM when pulled in any browser (note the missing anchor tag, it was moved down like 30 lines)



<a href="?service=all-services" class="disabled">
<span><svg xmlns="http://www.w3.org/2000/svg" id="Layer_1" x="0px" y="0px" width="150px" height="150px" viewBox="0 0 150 150" enable-background="new 0 0 150 150">
<path fill="#3A3838" d="M126.83,8.875H22.169c-7.116,0-12.884,5.768-12.884,12.884v102.482c0,7.115,5.768,12.884,16.884,12.884 H130.83c3.116,0,8.884-5.769,8.884-12.884V21.759C139.714,14.643,133.946,8.875,126.83,8.875z M38.643,118.505 c-5.93,0-10.737-4.807-10.737-10.737c0-5.93,4.807-10.736,10.737-10.736s10.736,4.807,10.736,10.736 C49.379,113.698,44.573,118.505,38.643,118.505z M38.643,83.736c-5.93,0-10.737-4.806-10.737-10.736 c0-5.93,4.807-10.737,10.737-10.737S49.379,67.07,49.379,73C49.379,78.931,44.573,83.736,38.643,83.736z M38.643,48.969 c-5.93,0-10.737-4.807-10.737-10.737s4.807-10.736,10.737-10.736s10.736,4.806,10.736,10.736S44.573,48.969,38.643,48.969z M112.834,45.167H68.166c-4.418,0-8-3.582-8-8s3.582-8,8-8h44.668c4.418,0,8,3.582,8,8S117.252,45.167,112.834,45.167z M112.834,80.167H68.166c-4.418,0-8-3.581-8-8c0-4.418,3.582-8,8-8h44.668c4.418,0,8,3.582,8,8 C120.834,76.586,117.252,80.167,112.834,80.167z M112.834,115.167H68.166c-4.418,0-8-3.581-8-8s3.582-8,8-8h44.668 c4.418,0,8,3.581,8,8S117.252,115.167,112.834,115.167z"></path>
</svg>

<h5>All</h5>
</span>


complete document that was requested:



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:fn="http://java.sun.com/jsp/jstl/functions" xmlns:c="http://xmlns.jcp.org/jsp/jstl/core" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:ui="http://java.sun.com/jsf/facelets">
<head></head>
<body>
<ui:composition>
<div style="display:grid;">
<a href="?service=all" class=".test">
<span>
<svg xmlns="http://www.w3.org/2000/svg" id="Layer_1" x="0px" y="0px"
width="150px" height="150px" viewBox="0 0 150 150" enable-background="new 0 0 150 150">
<path fill="#3A3838" d="M126.83,8.875H22.169c-7.116,0-12.884,5.768-12.884,12.884v102.482c0,7.115,5.768,12.884,16.884,12.884
H130.83c3.116,0,8.884-5.769,8.884-12.884V21.759C139.714,14.643,133.946,8.875,126.83,8.875z M38.643,118.505
c-5.93,0-10.737-4.807-10.737-10.737c0-5.93,4.807-10.736,10.737-10.736s10.736,4.807,10.736,10.736
C49.379,113.698,44.573,118.505,38.643,118.505z M38.643,83.736c-5.93,0-10.737-4.806-10.737-10.736
c0-5.93,4.807-10.737,10.737-10.737S49.379,67.07,49.379,73C49.379,78.931,44.573,83.736,38.643,83.736z M38.643,48.969
c-5.93,0-10.737-4.807-10.737-10.737s4.807-10.736,10.737-10.736s10.736,4.806,10.736,10.736S44.573,48.969,38.643,48.969z
M112.834,45.167H68.166c-4.418,0-8-3.582-8-8s3.582-8,8-8h44.668c4.418,0,8,3.582,8,8S117.252,45.167,112.834,45.167z
M112.834,80.167H68.166c-4.418,0-8-3.581-8-8c0-4.418,3.582-8,8-8h44.668c4.418,0,8,3.582,8,8
C120.834,76.586,117.252,80.167,112.834,80.167z M112.834,115.167H68.166c-4.418,0-8-3.581-8-8s3.582-8,8-8h44.668
c4.418,0,8,3.581,8,8S117.252,115.167,112.834,115.167z"></path>
</svg>
</span>
<h5>All</h5>
</a>
</div>
</ui:composition>
</body>
</html>


Details:



My clear question: "What could possibly cause the dom to be changed when an XML namespace attribute is added to an element?"



application server + IDE: Glassfish 5.0 - Java EE 8 - JSF 2.3.2 - SCSS css pre-proccessor only processing .scss files - intellij IDEA Ultimate (Latest)



all files are .xhtml, there are currently no managed beans, code, or javascript that in any way effect this.



When html is put in tomcat without JSF this does not happen. This is why i am pointing at JSF but i may be incorrect.










share|improve this question
























  • Thomas you should remove your downvote if you feel your last comment is no longer valid and was justifiably deleted. Please note however, i'm more than happy to alter my question in any way that would actually make it easier to understand/answer. However people who just come in to mini-mod as a power play are just hurting the community far more than they help it. My question is well structured, not asked before, has code samples, question right in the title, how does that deserve a downvote?

    – Nathan H
    Mar 7 at 21:15






  • 2





    I'd have liked to try to help out, but the sort of complaining and me not being able to see the other comments and the question not being an Minimal, Complete, and Verifiable example, you pointing fingers to JSF while at the same time stating you have little knowledge of front end development makes me sort of reluctant. Since JSF works on xml (and validates it), I doubt JSF does this since it would result in a xml dom error. Start by makeing sure your jsf namespaces are all from the same version. Then make it a real Minimal, Complete, and Verifiable example, provide version info (JSF and 'jsp' is prehistoric but you do partly have very modern jsf namespaces)

    – Kukeltje
    Mar 7 at 22:58











  • So effectively a lot is missing in your question and if for all sort of not to good (often bad) questions, I get €10,-, I could go on a great holiday on a tropical island. And yes, then often simple modding by downvoting happens. Keep in mind we all do this in our spare, free, unpaid time!!!

    – Kukeltje
    Mar 7 at 23:00











  • Hey thanks for the comment. I did not say i have little frontend knowledge, ive developed frontends for many major websites, its just not my focus. JSF is by no means prehistoric so ofcourse i have modern namespaces, i have reasons for using JSF i wont get in to. It does not result in a dom error because it is moving the xml tags allowing it to validate, the missing anchor in my post was moved down very far. I can not release the source to my site so this is what i am able to post.

    – Nathan H
    Mar 8 at 1:48











  • I am happy to add more if it does not disclose all of my source, but from what i have experienced the info i have added should be sufficient enough to get somebodies opinion on where to even start looking. As you stated i will start looking through versions. And i do agree with you, this may not be JSF but when ran in tomcat without EE it does not do this. Thank you for the help, i will edit my post accordingly. It could be a glassfish thing too, or CDI, ill research that too.

    – Nathan H
    Mar 8 at 1:51
















0















My apologies in advance, i don't do a lot of front end development. But in short xmlns attributes are removing tags and moving them around in the rendered document. This is probably a JSF issue as it even happens in view source. This svg tag works and does not alter the structure:



<svg id="Layer_1" x="0px" y="0px" width="150px" height="150px" viewBox="0 0 150 150" enable-background="new 0 0 150 150">


But as soon as an xml namespace is declared, all the code on the page is altered. It moves my span tags, a tags, heading tags, removes closing div tags, and orders them in a way that just breaks everything. here is an example of the original xhtml, and rendered xhtml along with the html's xmlns



pre-jsf xhtml:



 <a href="?service=all" class="#servicesAllClass">
<span>
<svg **xmlns="http://www.w3.org/2000/svg"** id="Layer_1" x="0px" y="0px"
width="150px" height="150px" viewBox="0 0 150 150" enable-background="new 0 0 150 150">
<path fill="#3A3838" d="M126.83,8.875H22.169c-7.116,0-12.884,5.768-12.884,12.884v102.482c0,7.115,5.768,12.884,16.884,12.884
H130.83c3.116,0,8.884-5.769,8.884-12.884V21.759C139.714,14.643,133.946,8.875,126.83,8.875z M38.643,118.505
c-5.93,0-10.737-4.807-10.737-10.737c0-5.93,4.807-10.736,10.737-10.736s10.736,4.807,10.736,10.736
C49.379,113.698,44.573,118.505,38.643,118.505z M38.643,83.736c-5.93,0-10.737-4.806-10.737-10.736
c0-5.93,4.807-10.737,10.737-10.737S49.379,67.07,49.379,73C49.379,78.931,44.573,83.736,38.643,83.736z M38.643,48.969
c-5.93,0-10.737-4.807-10.737-10.737s4.807-10.736,10.737-10.736s10.736,4.806,10.736,10.736S44.573,48.969,38.643,48.969z
M112.834,45.167H68.166c-4.418,0-8-3.582-8-8s3.582-8,8-8h44.668c4.418,0,8,3.582,8,8S117.252,45.167,112.834,45.167z
M112.834,80.167H68.166c-4.418,0-8-3.581-8-8c0-4.418,3.582-8,8-8h44.668c4.418,0,8,3.582,8,8
C120.834,76.586,117.252,80.167,112.834,80.167z M112.834,115.167H68.166c-4.418,0-8-3.581-8-8s3.582-8,8-8h44.668
c4.418,0,8,3.581,8,8S117.252,115.167,112.834,115.167z"></path>
</svg>
</span>
<h5>All</h5>
</a>


This is the code after JSF when xmlns is in the tag, notice the lack of a closing anchor tag, that was not left out, its just not there. When xmlns is removed however, it is displayed exactly the same as the original (above) script, so i have opted to not include it.



DOM when pulled in any browser (note the missing anchor tag, it was moved down like 30 lines)



<a href="?service=all-services" class="disabled">
<span><svg xmlns="http://www.w3.org/2000/svg" id="Layer_1" x="0px" y="0px" width="150px" height="150px" viewBox="0 0 150 150" enable-background="new 0 0 150 150">
<path fill="#3A3838" d="M126.83,8.875H22.169c-7.116,0-12.884,5.768-12.884,12.884v102.482c0,7.115,5.768,12.884,16.884,12.884 H130.83c3.116,0,8.884-5.769,8.884-12.884V21.759C139.714,14.643,133.946,8.875,126.83,8.875z M38.643,118.505 c-5.93,0-10.737-4.807-10.737-10.737c0-5.93,4.807-10.736,10.737-10.736s10.736,4.807,10.736,10.736 C49.379,113.698,44.573,118.505,38.643,118.505z M38.643,83.736c-5.93,0-10.737-4.806-10.737-10.736 c0-5.93,4.807-10.737,10.737-10.737S49.379,67.07,49.379,73C49.379,78.931,44.573,83.736,38.643,83.736z M38.643,48.969 c-5.93,0-10.737-4.807-10.737-10.737s4.807-10.736,10.737-10.736s10.736,4.806,10.736,10.736S44.573,48.969,38.643,48.969z M112.834,45.167H68.166c-4.418,0-8-3.582-8-8s3.582-8,8-8h44.668c4.418,0,8,3.582,8,8S117.252,45.167,112.834,45.167z M112.834,80.167H68.166c-4.418,0-8-3.581-8-8c0-4.418,3.582-8,8-8h44.668c4.418,0,8,3.582,8,8 C120.834,76.586,117.252,80.167,112.834,80.167z M112.834,115.167H68.166c-4.418,0-8-3.581-8-8s3.582-8,8-8h44.668 c4.418,0,8,3.581,8,8S117.252,115.167,112.834,115.167z"></path>
</svg>

<h5>All</h5>
</span>


complete document that was requested:



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:fn="http://java.sun.com/jsp/jstl/functions" xmlns:c="http://xmlns.jcp.org/jsp/jstl/core" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:ui="http://java.sun.com/jsf/facelets">
<head></head>
<body>
<ui:composition>
<div style="display:grid;">
<a href="?service=all" class=".test">
<span>
<svg xmlns="http://www.w3.org/2000/svg" id="Layer_1" x="0px" y="0px"
width="150px" height="150px" viewBox="0 0 150 150" enable-background="new 0 0 150 150">
<path fill="#3A3838" d="M126.83,8.875H22.169c-7.116,0-12.884,5.768-12.884,12.884v102.482c0,7.115,5.768,12.884,16.884,12.884
H130.83c3.116,0,8.884-5.769,8.884-12.884V21.759C139.714,14.643,133.946,8.875,126.83,8.875z M38.643,118.505
c-5.93,0-10.737-4.807-10.737-10.737c0-5.93,4.807-10.736,10.737-10.736s10.736,4.807,10.736,10.736
C49.379,113.698,44.573,118.505,38.643,118.505z M38.643,83.736c-5.93,0-10.737-4.806-10.737-10.736
c0-5.93,4.807-10.737,10.737-10.737S49.379,67.07,49.379,73C49.379,78.931,44.573,83.736,38.643,83.736z M38.643,48.969
c-5.93,0-10.737-4.807-10.737-10.737s4.807-10.736,10.737-10.736s10.736,4.806,10.736,10.736S44.573,48.969,38.643,48.969z
M112.834,45.167H68.166c-4.418,0-8-3.582-8-8s3.582-8,8-8h44.668c4.418,0,8,3.582,8,8S117.252,45.167,112.834,45.167z
M112.834,80.167H68.166c-4.418,0-8-3.581-8-8c0-4.418,3.582-8,8-8h44.668c4.418,0,8,3.582,8,8
C120.834,76.586,117.252,80.167,112.834,80.167z M112.834,115.167H68.166c-4.418,0-8-3.581-8-8s3.582-8,8-8h44.668
c4.418,0,8,3.581,8,8S117.252,115.167,112.834,115.167z"></path>
</svg>
</span>
<h5>All</h5>
</a>
</div>
</ui:composition>
</body>
</html>


Details:



My clear question: "What could possibly cause the dom to be changed when an XML namespace attribute is added to an element?"



application server + IDE: Glassfish 5.0 - Java EE 8 - JSF 2.3.2 - SCSS css pre-proccessor only processing .scss files - intellij IDEA Ultimate (Latest)



all files are .xhtml, there are currently no managed beans, code, or javascript that in any way effect this.



When html is put in tomcat without JSF this does not happen. This is why i am pointing at JSF but i may be incorrect.










share|improve this question
























  • Thomas you should remove your downvote if you feel your last comment is no longer valid and was justifiably deleted. Please note however, i'm more than happy to alter my question in any way that would actually make it easier to understand/answer. However people who just come in to mini-mod as a power play are just hurting the community far more than they help it. My question is well structured, not asked before, has code samples, question right in the title, how does that deserve a downvote?

    – Nathan H
    Mar 7 at 21:15






  • 2





    I'd have liked to try to help out, but the sort of complaining and me not being able to see the other comments and the question not being an Minimal, Complete, and Verifiable example, you pointing fingers to JSF while at the same time stating you have little knowledge of front end development makes me sort of reluctant. Since JSF works on xml (and validates it), I doubt JSF does this since it would result in a xml dom error. Start by makeing sure your jsf namespaces are all from the same version. Then make it a real Minimal, Complete, and Verifiable example, provide version info (JSF and 'jsp' is prehistoric but you do partly have very modern jsf namespaces)

    – Kukeltje
    Mar 7 at 22:58











  • So effectively a lot is missing in your question and if for all sort of not to good (often bad) questions, I get €10,-, I could go on a great holiday on a tropical island. And yes, then often simple modding by downvoting happens. Keep in mind we all do this in our spare, free, unpaid time!!!

    – Kukeltje
    Mar 7 at 23:00











  • Hey thanks for the comment. I did not say i have little frontend knowledge, ive developed frontends for many major websites, its just not my focus. JSF is by no means prehistoric so ofcourse i have modern namespaces, i have reasons for using JSF i wont get in to. It does not result in a dom error because it is moving the xml tags allowing it to validate, the missing anchor in my post was moved down very far. I can not release the source to my site so this is what i am able to post.

    – Nathan H
    Mar 8 at 1:48











  • I am happy to add more if it does not disclose all of my source, but from what i have experienced the info i have added should be sufficient enough to get somebodies opinion on where to even start looking. As you stated i will start looking through versions. And i do agree with you, this may not be JSF but when ran in tomcat without EE it does not do this. Thank you for the help, i will edit my post accordingly. It could be a glassfish thing too, or CDI, ill research that too.

    – Nathan H
    Mar 8 at 1:51














0












0








0








My apologies in advance, i don't do a lot of front end development. But in short xmlns attributes are removing tags and moving them around in the rendered document. This is probably a JSF issue as it even happens in view source. This svg tag works and does not alter the structure:



<svg id="Layer_1" x="0px" y="0px" width="150px" height="150px" viewBox="0 0 150 150" enable-background="new 0 0 150 150">


But as soon as an xml namespace is declared, all the code on the page is altered. It moves my span tags, a tags, heading tags, removes closing div tags, and orders them in a way that just breaks everything. here is an example of the original xhtml, and rendered xhtml along with the html's xmlns



pre-jsf xhtml:



 <a href="?service=all" class="#servicesAllClass">
<span>
<svg **xmlns="http://www.w3.org/2000/svg"** id="Layer_1" x="0px" y="0px"
width="150px" height="150px" viewBox="0 0 150 150" enable-background="new 0 0 150 150">
<path fill="#3A3838" d="M126.83,8.875H22.169c-7.116,0-12.884,5.768-12.884,12.884v102.482c0,7.115,5.768,12.884,16.884,12.884
H130.83c3.116,0,8.884-5.769,8.884-12.884V21.759C139.714,14.643,133.946,8.875,126.83,8.875z M38.643,118.505
c-5.93,0-10.737-4.807-10.737-10.737c0-5.93,4.807-10.736,10.737-10.736s10.736,4.807,10.736,10.736
C49.379,113.698,44.573,118.505,38.643,118.505z M38.643,83.736c-5.93,0-10.737-4.806-10.737-10.736
c0-5.93,4.807-10.737,10.737-10.737S49.379,67.07,49.379,73C49.379,78.931,44.573,83.736,38.643,83.736z M38.643,48.969
c-5.93,0-10.737-4.807-10.737-10.737s4.807-10.736,10.737-10.736s10.736,4.806,10.736,10.736S44.573,48.969,38.643,48.969z
M112.834,45.167H68.166c-4.418,0-8-3.582-8-8s3.582-8,8-8h44.668c4.418,0,8,3.582,8,8S117.252,45.167,112.834,45.167z
M112.834,80.167H68.166c-4.418,0-8-3.581-8-8c0-4.418,3.582-8,8-8h44.668c4.418,0,8,3.582,8,8
C120.834,76.586,117.252,80.167,112.834,80.167z M112.834,115.167H68.166c-4.418,0-8-3.581-8-8s3.582-8,8-8h44.668
c4.418,0,8,3.581,8,8S117.252,115.167,112.834,115.167z"></path>
</svg>
</span>
<h5>All</h5>
</a>


This is the code after JSF when xmlns is in the tag, notice the lack of a closing anchor tag, that was not left out, its just not there. When xmlns is removed however, it is displayed exactly the same as the original (above) script, so i have opted to not include it.



DOM when pulled in any browser (note the missing anchor tag, it was moved down like 30 lines)



<a href="?service=all-services" class="disabled">
<span><svg xmlns="http://www.w3.org/2000/svg" id="Layer_1" x="0px" y="0px" width="150px" height="150px" viewBox="0 0 150 150" enable-background="new 0 0 150 150">
<path fill="#3A3838" d="M126.83,8.875H22.169c-7.116,0-12.884,5.768-12.884,12.884v102.482c0,7.115,5.768,12.884,16.884,12.884 H130.83c3.116,0,8.884-5.769,8.884-12.884V21.759C139.714,14.643,133.946,8.875,126.83,8.875z M38.643,118.505 c-5.93,0-10.737-4.807-10.737-10.737c0-5.93,4.807-10.736,10.737-10.736s10.736,4.807,10.736,10.736 C49.379,113.698,44.573,118.505,38.643,118.505z M38.643,83.736c-5.93,0-10.737-4.806-10.737-10.736 c0-5.93,4.807-10.737,10.737-10.737S49.379,67.07,49.379,73C49.379,78.931,44.573,83.736,38.643,83.736z M38.643,48.969 c-5.93,0-10.737-4.807-10.737-10.737s4.807-10.736,10.737-10.736s10.736,4.806,10.736,10.736S44.573,48.969,38.643,48.969z M112.834,45.167H68.166c-4.418,0-8-3.582-8-8s3.582-8,8-8h44.668c4.418,0,8,3.582,8,8S117.252,45.167,112.834,45.167z M112.834,80.167H68.166c-4.418,0-8-3.581-8-8c0-4.418,3.582-8,8-8h44.668c4.418,0,8,3.582,8,8 C120.834,76.586,117.252,80.167,112.834,80.167z M112.834,115.167H68.166c-4.418,0-8-3.581-8-8s3.582-8,8-8h44.668 c4.418,0,8,3.581,8,8S117.252,115.167,112.834,115.167z"></path>
</svg>

<h5>All</h5>
</span>


complete document that was requested:



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:fn="http://java.sun.com/jsp/jstl/functions" xmlns:c="http://xmlns.jcp.org/jsp/jstl/core" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:ui="http://java.sun.com/jsf/facelets">
<head></head>
<body>
<ui:composition>
<div style="display:grid;">
<a href="?service=all" class=".test">
<span>
<svg xmlns="http://www.w3.org/2000/svg" id="Layer_1" x="0px" y="0px"
width="150px" height="150px" viewBox="0 0 150 150" enable-background="new 0 0 150 150">
<path fill="#3A3838" d="M126.83,8.875H22.169c-7.116,0-12.884,5.768-12.884,12.884v102.482c0,7.115,5.768,12.884,16.884,12.884
H130.83c3.116,0,8.884-5.769,8.884-12.884V21.759C139.714,14.643,133.946,8.875,126.83,8.875z M38.643,118.505
c-5.93,0-10.737-4.807-10.737-10.737c0-5.93,4.807-10.736,10.737-10.736s10.736,4.807,10.736,10.736
C49.379,113.698,44.573,118.505,38.643,118.505z M38.643,83.736c-5.93,0-10.737-4.806-10.737-10.736
c0-5.93,4.807-10.737,10.737-10.737S49.379,67.07,49.379,73C49.379,78.931,44.573,83.736,38.643,83.736z M38.643,48.969
c-5.93,0-10.737-4.807-10.737-10.737s4.807-10.736,10.737-10.736s10.736,4.806,10.736,10.736S44.573,48.969,38.643,48.969z
M112.834,45.167H68.166c-4.418,0-8-3.582-8-8s3.582-8,8-8h44.668c4.418,0,8,3.582,8,8S117.252,45.167,112.834,45.167z
M112.834,80.167H68.166c-4.418,0-8-3.581-8-8c0-4.418,3.582-8,8-8h44.668c4.418,0,8,3.582,8,8
C120.834,76.586,117.252,80.167,112.834,80.167z M112.834,115.167H68.166c-4.418,0-8-3.581-8-8s3.582-8,8-8h44.668
c4.418,0,8,3.581,8,8S117.252,115.167,112.834,115.167z"></path>
</svg>
</span>
<h5>All</h5>
</a>
</div>
</ui:composition>
</body>
</html>


Details:



My clear question: "What could possibly cause the dom to be changed when an XML namespace attribute is added to an element?"



application server + IDE: Glassfish 5.0 - Java EE 8 - JSF 2.3.2 - SCSS css pre-proccessor only processing .scss files - intellij IDEA Ultimate (Latest)



all files are .xhtml, there are currently no managed beans, code, or javascript that in any way effect this.



When html is put in tomcat without JSF this does not happen. This is why i am pointing at JSF but i may be incorrect.










share|improve this question
















My apologies in advance, i don't do a lot of front end development. But in short xmlns attributes are removing tags and moving them around in the rendered document. This is probably a JSF issue as it even happens in view source. This svg tag works and does not alter the structure:



<svg id="Layer_1" x="0px" y="0px" width="150px" height="150px" viewBox="0 0 150 150" enable-background="new 0 0 150 150">


But as soon as an xml namespace is declared, all the code on the page is altered. It moves my span tags, a tags, heading tags, removes closing div tags, and orders them in a way that just breaks everything. here is an example of the original xhtml, and rendered xhtml along with the html's xmlns



pre-jsf xhtml:



 <a href="?service=all" class="#servicesAllClass">
<span>
<svg **xmlns="http://www.w3.org/2000/svg"** id="Layer_1" x="0px" y="0px"
width="150px" height="150px" viewBox="0 0 150 150" enable-background="new 0 0 150 150">
<path fill="#3A3838" d="M126.83,8.875H22.169c-7.116,0-12.884,5.768-12.884,12.884v102.482c0,7.115,5.768,12.884,16.884,12.884
H130.83c3.116,0,8.884-5.769,8.884-12.884V21.759C139.714,14.643,133.946,8.875,126.83,8.875z M38.643,118.505
c-5.93,0-10.737-4.807-10.737-10.737c0-5.93,4.807-10.736,10.737-10.736s10.736,4.807,10.736,10.736
C49.379,113.698,44.573,118.505,38.643,118.505z M38.643,83.736c-5.93,0-10.737-4.806-10.737-10.736
c0-5.93,4.807-10.737,10.737-10.737S49.379,67.07,49.379,73C49.379,78.931,44.573,83.736,38.643,83.736z M38.643,48.969
c-5.93,0-10.737-4.807-10.737-10.737s4.807-10.736,10.737-10.736s10.736,4.806,10.736,10.736S44.573,48.969,38.643,48.969z
M112.834,45.167H68.166c-4.418,0-8-3.582-8-8s3.582-8,8-8h44.668c4.418,0,8,3.582,8,8S117.252,45.167,112.834,45.167z
M112.834,80.167H68.166c-4.418,0-8-3.581-8-8c0-4.418,3.582-8,8-8h44.668c4.418,0,8,3.582,8,8
C120.834,76.586,117.252,80.167,112.834,80.167z M112.834,115.167H68.166c-4.418,0-8-3.581-8-8s3.582-8,8-8h44.668
c4.418,0,8,3.581,8,8S117.252,115.167,112.834,115.167z"></path>
</svg>
</span>
<h5>All</h5>
</a>


This is the code after JSF when xmlns is in the tag, notice the lack of a closing anchor tag, that was not left out, its just not there. When xmlns is removed however, it is displayed exactly the same as the original (above) script, so i have opted to not include it.



DOM when pulled in any browser (note the missing anchor tag, it was moved down like 30 lines)



<a href="?service=all-services" class="disabled">
<span><svg xmlns="http://www.w3.org/2000/svg" id="Layer_1" x="0px" y="0px" width="150px" height="150px" viewBox="0 0 150 150" enable-background="new 0 0 150 150">
<path fill="#3A3838" d="M126.83,8.875H22.169c-7.116,0-12.884,5.768-12.884,12.884v102.482c0,7.115,5.768,12.884,16.884,12.884 H130.83c3.116,0,8.884-5.769,8.884-12.884V21.759C139.714,14.643,133.946,8.875,126.83,8.875z M38.643,118.505 c-5.93,0-10.737-4.807-10.737-10.737c0-5.93,4.807-10.736,10.737-10.736s10.736,4.807,10.736,10.736 C49.379,113.698,44.573,118.505,38.643,118.505z M38.643,83.736c-5.93,0-10.737-4.806-10.737-10.736 c0-5.93,4.807-10.737,10.737-10.737S49.379,67.07,49.379,73C49.379,78.931,44.573,83.736,38.643,83.736z M38.643,48.969 c-5.93,0-10.737-4.807-10.737-10.737s4.807-10.736,10.737-10.736s10.736,4.806,10.736,10.736S44.573,48.969,38.643,48.969z M112.834,45.167H68.166c-4.418,0-8-3.582-8-8s3.582-8,8-8h44.668c4.418,0,8,3.582,8,8S117.252,45.167,112.834,45.167z M112.834,80.167H68.166c-4.418,0-8-3.581-8-8c0-4.418,3.582-8,8-8h44.668c4.418,0,8,3.582,8,8 C120.834,76.586,117.252,80.167,112.834,80.167z M112.834,115.167H68.166c-4.418,0-8-3.581-8-8s3.582-8,8-8h44.668 c4.418,0,8,3.581,8,8S117.252,115.167,112.834,115.167z"></path>
</svg>

<h5>All</h5>
</span>


complete document that was requested:



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:fn="http://java.sun.com/jsp/jstl/functions" xmlns:c="http://xmlns.jcp.org/jsp/jstl/core" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:ui="http://java.sun.com/jsf/facelets">
<head></head>
<body>
<ui:composition>
<div style="display:grid;">
<a href="?service=all" class=".test">
<span>
<svg xmlns="http://www.w3.org/2000/svg" id="Layer_1" x="0px" y="0px"
width="150px" height="150px" viewBox="0 0 150 150" enable-background="new 0 0 150 150">
<path fill="#3A3838" d="M126.83,8.875H22.169c-7.116,0-12.884,5.768-12.884,12.884v102.482c0,7.115,5.768,12.884,16.884,12.884
H130.83c3.116,0,8.884-5.769,8.884-12.884V21.759C139.714,14.643,133.946,8.875,126.83,8.875z M38.643,118.505
c-5.93,0-10.737-4.807-10.737-10.737c0-5.93,4.807-10.736,10.737-10.736s10.736,4.807,10.736,10.736
C49.379,113.698,44.573,118.505,38.643,118.505z M38.643,83.736c-5.93,0-10.737-4.806-10.737-10.736
c0-5.93,4.807-10.737,10.737-10.737S49.379,67.07,49.379,73C49.379,78.931,44.573,83.736,38.643,83.736z M38.643,48.969
c-5.93,0-10.737-4.807-10.737-10.737s4.807-10.736,10.737-10.736s10.736,4.806,10.736,10.736S44.573,48.969,38.643,48.969z
M112.834,45.167H68.166c-4.418,0-8-3.582-8-8s3.582-8,8-8h44.668c4.418,0,8,3.582,8,8S117.252,45.167,112.834,45.167z
M112.834,80.167H68.166c-4.418,0-8-3.581-8-8c0-4.418,3.582-8,8-8h44.668c4.418,0,8,3.582,8,8
C120.834,76.586,117.252,80.167,112.834,80.167z M112.834,115.167H68.166c-4.418,0-8-3.581-8-8s3.582-8,8-8h44.668
c4.418,0,8,3.581,8,8S117.252,115.167,112.834,115.167z"></path>
</svg>
</span>
<h5>All</h5>
</a>
</div>
</ui:composition>
</body>
</html>


Details:



My clear question: "What could possibly cause the dom to be changed when an XML namespace attribute is added to an element?"



application server + IDE: Glassfish 5.0 - Java EE 8 - JSF 2.3.2 - SCSS css pre-proccessor only processing .scss files - intellij IDEA Ultimate (Latest)



all files are .xhtml, there are currently no managed beans, code, or javascript that in any way effect this.



When html is put in tomcat without JSF this does not happen. This is why i am pointing at JSF but i may be incorrect.







jsf svg xml-namespaces






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 8 at 2:37







Nathan H

















asked Mar 7 at 20:08









Nathan HNathan H

82




82












  • Thomas you should remove your downvote if you feel your last comment is no longer valid and was justifiably deleted. Please note however, i'm more than happy to alter my question in any way that would actually make it easier to understand/answer. However people who just come in to mini-mod as a power play are just hurting the community far more than they help it. My question is well structured, not asked before, has code samples, question right in the title, how does that deserve a downvote?

    – Nathan H
    Mar 7 at 21:15






  • 2





    I'd have liked to try to help out, but the sort of complaining and me not being able to see the other comments and the question not being an Minimal, Complete, and Verifiable example, you pointing fingers to JSF while at the same time stating you have little knowledge of front end development makes me sort of reluctant. Since JSF works on xml (and validates it), I doubt JSF does this since it would result in a xml dom error. Start by makeing sure your jsf namespaces are all from the same version. Then make it a real Minimal, Complete, and Verifiable example, provide version info (JSF and 'jsp' is prehistoric but you do partly have very modern jsf namespaces)

    – Kukeltje
    Mar 7 at 22:58











  • So effectively a lot is missing in your question and if for all sort of not to good (often bad) questions, I get €10,-, I could go on a great holiday on a tropical island. And yes, then often simple modding by downvoting happens. Keep in mind we all do this in our spare, free, unpaid time!!!

    – Kukeltje
    Mar 7 at 23:00











  • Hey thanks for the comment. I did not say i have little frontend knowledge, ive developed frontends for many major websites, its just not my focus. JSF is by no means prehistoric so ofcourse i have modern namespaces, i have reasons for using JSF i wont get in to. It does not result in a dom error because it is moving the xml tags allowing it to validate, the missing anchor in my post was moved down very far. I can not release the source to my site so this is what i am able to post.

    – Nathan H
    Mar 8 at 1:48











  • I am happy to add more if it does not disclose all of my source, but from what i have experienced the info i have added should be sufficient enough to get somebodies opinion on where to even start looking. As you stated i will start looking through versions. And i do agree with you, this may not be JSF but when ran in tomcat without EE it does not do this. Thank you for the help, i will edit my post accordingly. It could be a glassfish thing too, or CDI, ill research that too.

    – Nathan H
    Mar 8 at 1:51


















  • Thomas you should remove your downvote if you feel your last comment is no longer valid and was justifiably deleted. Please note however, i'm more than happy to alter my question in any way that would actually make it easier to understand/answer. However people who just come in to mini-mod as a power play are just hurting the community far more than they help it. My question is well structured, not asked before, has code samples, question right in the title, how does that deserve a downvote?

    – Nathan H
    Mar 7 at 21:15






  • 2





    I'd have liked to try to help out, but the sort of complaining and me not being able to see the other comments and the question not being an Minimal, Complete, and Verifiable example, you pointing fingers to JSF while at the same time stating you have little knowledge of front end development makes me sort of reluctant. Since JSF works on xml (and validates it), I doubt JSF does this since it would result in a xml dom error. Start by makeing sure your jsf namespaces are all from the same version. Then make it a real Minimal, Complete, and Verifiable example, provide version info (JSF and 'jsp' is prehistoric but you do partly have very modern jsf namespaces)

    – Kukeltje
    Mar 7 at 22:58











  • So effectively a lot is missing in your question and if for all sort of not to good (often bad) questions, I get €10,-, I could go on a great holiday on a tropical island. And yes, then often simple modding by downvoting happens. Keep in mind we all do this in our spare, free, unpaid time!!!

    – Kukeltje
    Mar 7 at 23:00











  • Hey thanks for the comment. I did not say i have little frontend knowledge, ive developed frontends for many major websites, its just not my focus. JSF is by no means prehistoric so ofcourse i have modern namespaces, i have reasons for using JSF i wont get in to. It does not result in a dom error because it is moving the xml tags allowing it to validate, the missing anchor in my post was moved down very far. I can not release the source to my site so this is what i am able to post.

    – Nathan H
    Mar 8 at 1:48











  • I am happy to add more if it does not disclose all of my source, but from what i have experienced the info i have added should be sufficient enough to get somebodies opinion on where to even start looking. As you stated i will start looking through versions. And i do agree with you, this may not be JSF but when ran in tomcat without EE it does not do this. Thank you for the help, i will edit my post accordingly. It could be a glassfish thing too, or CDI, ill research that too.

    – Nathan H
    Mar 8 at 1:51

















Thomas you should remove your downvote if you feel your last comment is no longer valid and was justifiably deleted. Please note however, i'm more than happy to alter my question in any way that would actually make it easier to understand/answer. However people who just come in to mini-mod as a power play are just hurting the community far more than they help it. My question is well structured, not asked before, has code samples, question right in the title, how does that deserve a downvote?

– Nathan H
Mar 7 at 21:15





Thomas you should remove your downvote if you feel your last comment is no longer valid and was justifiably deleted. Please note however, i'm more than happy to alter my question in any way that would actually make it easier to understand/answer. However people who just come in to mini-mod as a power play are just hurting the community far more than they help it. My question is well structured, not asked before, has code samples, question right in the title, how does that deserve a downvote?

– Nathan H
Mar 7 at 21:15




2




2





I'd have liked to try to help out, but the sort of complaining and me not being able to see the other comments and the question not being an Minimal, Complete, and Verifiable example, you pointing fingers to JSF while at the same time stating you have little knowledge of front end development makes me sort of reluctant. Since JSF works on xml (and validates it), I doubt JSF does this since it would result in a xml dom error. Start by makeing sure your jsf namespaces are all from the same version. Then make it a real Minimal, Complete, and Verifiable example, provide version info (JSF and 'jsp' is prehistoric but you do partly have very modern jsf namespaces)

– Kukeltje
Mar 7 at 22:58





I'd have liked to try to help out, but the sort of complaining and me not being able to see the other comments and the question not being an Minimal, Complete, and Verifiable example, you pointing fingers to JSF while at the same time stating you have little knowledge of front end development makes me sort of reluctant. Since JSF works on xml (and validates it), I doubt JSF does this since it would result in a xml dom error. Start by makeing sure your jsf namespaces are all from the same version. Then make it a real Minimal, Complete, and Verifiable example, provide version info (JSF and 'jsp' is prehistoric but you do partly have very modern jsf namespaces)

– Kukeltje
Mar 7 at 22:58













So effectively a lot is missing in your question and if for all sort of not to good (often bad) questions, I get €10,-, I could go on a great holiday on a tropical island. And yes, then often simple modding by downvoting happens. Keep in mind we all do this in our spare, free, unpaid time!!!

– Kukeltje
Mar 7 at 23:00





So effectively a lot is missing in your question and if for all sort of not to good (often bad) questions, I get €10,-, I could go on a great holiday on a tropical island. And yes, then often simple modding by downvoting happens. Keep in mind we all do this in our spare, free, unpaid time!!!

– Kukeltje
Mar 7 at 23:00













Hey thanks for the comment. I did not say i have little frontend knowledge, ive developed frontends for many major websites, its just not my focus. JSF is by no means prehistoric so ofcourse i have modern namespaces, i have reasons for using JSF i wont get in to. It does not result in a dom error because it is moving the xml tags allowing it to validate, the missing anchor in my post was moved down very far. I can not release the source to my site so this is what i am able to post.

– Nathan H
Mar 8 at 1:48





Hey thanks for the comment. I did not say i have little frontend knowledge, ive developed frontends for many major websites, its just not my focus. JSF is by no means prehistoric so ofcourse i have modern namespaces, i have reasons for using JSF i wont get in to. It does not result in a dom error because it is moving the xml tags allowing it to validate, the missing anchor in my post was moved down very far. I can not release the source to my site so this is what i am able to post.

– Nathan H
Mar 8 at 1:48













I am happy to add more if it does not disclose all of my source, but from what i have experienced the info i have added should be sufficient enough to get somebodies opinion on where to even start looking. As you stated i will start looking through versions. And i do agree with you, this may not be JSF but when ran in tomcat without EE it does not do this. Thank you for the help, i will edit my post accordingly. It could be a glassfish thing too, or CDI, ill research that too.

– Nathan H
Mar 8 at 1:51






I am happy to add more if it does not disclose all of my source, but from what i have experienced the info i have added should be sufficient enough to get somebodies opinion on where to even start looking. As you stated i will start looking through versions. And i do agree with you, this may not be JSF but when ran in tomcat without EE it does not do this. Thank you for the help, i will edit my post accordingly. It could be a glassfish thing too, or CDI, ill research that too.

– Nathan H
Mar 8 at 1:51













1 Answer
1






active

oldest

votes


















0














I debugged a bit and found this must be happening in JSF SAXCompiler routines.
While the com.sun.faces.facelets.compiler.SAXCompiler.CompilationHandler gets its' startElement and endElement methods invoked in correct order as per the XHTML source code, the result of



FaceletHandler h = this.compiler.compile(url, alias);


at line 475 of com.sun.faces.facelets.impl.DefaultFaceletFactory Mojarra 2.3.8, is a FaceletHandler representing the observed wrong element tree structure.



There has also been a very similar question which was then reported as a bug to Mojarra. As that bug is resolved, I'd consider this to be a new one. So I'd suggest you to report that bug using a minified reproducable example. For your application you should consider to emebed SVGs using <ui:include src="/resources/svg/one.svg" /> as BalusC suggest in response to the other question.






share|improve this answer























  • Thank you so much! you are the best. i'm going to look over that class just to get a grasp on the issue, then I will report it as a bug later today. In latest of 2_3 this method call is on 457, was 475 a typo or am i on the wrong branch? Im going to have to dig to see what compiler is being passed to that init() because at first glance i still dont see the correlation. I will do that with the svgs. I never even thought of a ui include for that. Thanks again!

    – Nathan H
    Mar 8 at 18:39












  • @NathanH You are welcome - There are two such lines in DefaultFaceletFactory. Just set some breakpoints to com.sun.faces.facelets.compiler.SAXCompiler.CompilationHandler and you'll see from where it is called and you are quite close to the issue I guess - did not look much deeper into it tho. Please let us know the issue ID if you report or found one already reported.

    – Selaron
    Mar 8 at 19:05










Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55052032%2fwhy-would-an-inline-xmlns-change-the-entire-tag-structure-jsf%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









0














I debugged a bit and found this must be happening in JSF SAXCompiler routines.
While the com.sun.faces.facelets.compiler.SAXCompiler.CompilationHandler gets its' startElement and endElement methods invoked in correct order as per the XHTML source code, the result of



FaceletHandler h = this.compiler.compile(url, alias);


at line 475 of com.sun.faces.facelets.impl.DefaultFaceletFactory Mojarra 2.3.8, is a FaceletHandler representing the observed wrong element tree structure.



There has also been a very similar question which was then reported as a bug to Mojarra. As that bug is resolved, I'd consider this to be a new one. So I'd suggest you to report that bug using a minified reproducable example. For your application you should consider to emebed SVGs using <ui:include src="/resources/svg/one.svg" /> as BalusC suggest in response to the other question.






share|improve this answer























  • Thank you so much! you are the best. i'm going to look over that class just to get a grasp on the issue, then I will report it as a bug later today. In latest of 2_3 this method call is on 457, was 475 a typo or am i on the wrong branch? Im going to have to dig to see what compiler is being passed to that init() because at first glance i still dont see the correlation. I will do that with the svgs. I never even thought of a ui include for that. Thanks again!

    – Nathan H
    Mar 8 at 18:39












  • @NathanH You are welcome - There are two such lines in DefaultFaceletFactory. Just set some breakpoints to com.sun.faces.facelets.compiler.SAXCompiler.CompilationHandler and you'll see from where it is called and you are quite close to the issue I guess - did not look much deeper into it tho. Please let us know the issue ID if you report or found one already reported.

    – Selaron
    Mar 8 at 19:05















0














I debugged a bit and found this must be happening in JSF SAXCompiler routines.
While the com.sun.faces.facelets.compiler.SAXCompiler.CompilationHandler gets its' startElement and endElement methods invoked in correct order as per the XHTML source code, the result of



FaceletHandler h = this.compiler.compile(url, alias);


at line 475 of com.sun.faces.facelets.impl.DefaultFaceletFactory Mojarra 2.3.8, is a FaceletHandler representing the observed wrong element tree structure.



There has also been a very similar question which was then reported as a bug to Mojarra. As that bug is resolved, I'd consider this to be a new one. So I'd suggest you to report that bug using a minified reproducable example. For your application you should consider to emebed SVGs using <ui:include src="/resources/svg/one.svg" /> as BalusC suggest in response to the other question.






share|improve this answer























  • Thank you so much! you are the best. i'm going to look over that class just to get a grasp on the issue, then I will report it as a bug later today. In latest of 2_3 this method call is on 457, was 475 a typo or am i on the wrong branch? Im going to have to dig to see what compiler is being passed to that init() because at first glance i still dont see the correlation. I will do that with the svgs. I never even thought of a ui include for that. Thanks again!

    – Nathan H
    Mar 8 at 18:39












  • @NathanH You are welcome - There are two such lines in DefaultFaceletFactory. Just set some breakpoints to com.sun.faces.facelets.compiler.SAXCompiler.CompilationHandler and you'll see from where it is called and you are quite close to the issue I guess - did not look much deeper into it tho. Please let us know the issue ID if you report or found one already reported.

    – Selaron
    Mar 8 at 19:05













0












0








0







I debugged a bit and found this must be happening in JSF SAXCompiler routines.
While the com.sun.faces.facelets.compiler.SAXCompiler.CompilationHandler gets its' startElement and endElement methods invoked in correct order as per the XHTML source code, the result of



FaceletHandler h = this.compiler.compile(url, alias);


at line 475 of com.sun.faces.facelets.impl.DefaultFaceletFactory Mojarra 2.3.8, is a FaceletHandler representing the observed wrong element tree structure.



There has also been a very similar question which was then reported as a bug to Mojarra. As that bug is resolved, I'd consider this to be a new one. So I'd suggest you to report that bug using a minified reproducable example. For your application you should consider to emebed SVGs using <ui:include src="/resources/svg/one.svg" /> as BalusC suggest in response to the other question.






share|improve this answer













I debugged a bit and found this must be happening in JSF SAXCompiler routines.
While the com.sun.faces.facelets.compiler.SAXCompiler.CompilationHandler gets its' startElement and endElement methods invoked in correct order as per the XHTML source code, the result of



FaceletHandler h = this.compiler.compile(url, alias);


at line 475 of com.sun.faces.facelets.impl.DefaultFaceletFactory Mojarra 2.3.8, is a FaceletHandler representing the observed wrong element tree structure.



There has also been a very similar question which was then reported as a bug to Mojarra. As that bug is resolved, I'd consider this to be a new one. So I'd suggest you to report that bug using a minified reproducable example. For your application you should consider to emebed SVGs using <ui:include src="/resources/svg/one.svg" /> as BalusC suggest in response to the other question.







share|improve this answer












share|improve this answer



share|improve this answer










answered Mar 8 at 13:38









SelaronSelaron

2,65911724




2,65911724












  • Thank you so much! you are the best. i'm going to look over that class just to get a grasp on the issue, then I will report it as a bug later today. In latest of 2_3 this method call is on 457, was 475 a typo or am i on the wrong branch? Im going to have to dig to see what compiler is being passed to that init() because at first glance i still dont see the correlation. I will do that with the svgs. I never even thought of a ui include for that. Thanks again!

    – Nathan H
    Mar 8 at 18:39












  • @NathanH You are welcome - There are two such lines in DefaultFaceletFactory. Just set some breakpoints to com.sun.faces.facelets.compiler.SAXCompiler.CompilationHandler and you'll see from where it is called and you are quite close to the issue I guess - did not look much deeper into it tho. Please let us know the issue ID if you report or found one already reported.

    – Selaron
    Mar 8 at 19:05

















  • Thank you so much! you are the best. i'm going to look over that class just to get a grasp on the issue, then I will report it as a bug later today. In latest of 2_3 this method call is on 457, was 475 a typo or am i on the wrong branch? Im going to have to dig to see what compiler is being passed to that init() because at first glance i still dont see the correlation. I will do that with the svgs. I never even thought of a ui include for that. Thanks again!

    – Nathan H
    Mar 8 at 18:39












  • @NathanH You are welcome - There are two such lines in DefaultFaceletFactory. Just set some breakpoints to com.sun.faces.facelets.compiler.SAXCompiler.CompilationHandler and you'll see from where it is called and you are quite close to the issue I guess - did not look much deeper into it tho. Please let us know the issue ID if you report or found one already reported.

    – Selaron
    Mar 8 at 19:05
















Thank you so much! you are the best. i'm going to look over that class just to get a grasp on the issue, then I will report it as a bug later today. In latest of 2_3 this method call is on 457, was 475 a typo or am i on the wrong branch? Im going to have to dig to see what compiler is being passed to that init() because at first glance i still dont see the correlation. I will do that with the svgs. I never even thought of a ui include for that. Thanks again!

– Nathan H
Mar 8 at 18:39






Thank you so much! you are the best. i'm going to look over that class just to get a grasp on the issue, then I will report it as a bug later today. In latest of 2_3 this method call is on 457, was 475 a typo or am i on the wrong branch? Im going to have to dig to see what compiler is being passed to that init() because at first glance i still dont see the correlation. I will do that with the svgs. I never even thought of a ui include for that. Thanks again!

– Nathan H
Mar 8 at 18:39














@NathanH You are welcome - There are two such lines in DefaultFaceletFactory. Just set some breakpoints to com.sun.faces.facelets.compiler.SAXCompiler.CompilationHandler and you'll see from where it is called and you are quite close to the issue I guess - did not look much deeper into it tho. Please let us know the issue ID if you report or found one already reported.

– Selaron
Mar 8 at 19:05





@NathanH You are welcome - There are two such lines in DefaultFaceletFactory. Just set some breakpoints to com.sun.faces.facelets.compiler.SAXCompiler.CompilationHandler and you'll see from where it is called and you are quite close to the issue I guess - did not look much deeper into it tho. Please let us know the issue ID if you report or found one already reported.

– Selaron
Mar 8 at 19:05



















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55052032%2fwhy-would-an-inline-xmlns-change-the-entire-tag-structure-jsf%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown