Ninja Technique nodes not respecting heirarchy
This is an open discussion with 3 replies, filed under XSLT.
Search
This is a simple one - but it will involve changing your syntax.
The issue is not with your XSLT (sorry to say) but the fact that the figure
element is a block element and is not allowed to reside within a p tag. So your standard browser would break it out of the paragraph tags.
Could you just double check your source code (not inspector) to confirm that it's the case.
AH! now that is where I hadn't thought to check :)
Looks like Chrome, throws elements out of sync in the browser.but when inspecting the source.. it's correct.
I changed the figure element to a span and it seems fine...
Thanks for the info Jon.
No problem you're welcome :)
Btw what I usually do (because I didn't mention) is in that case first match the image and output the figure and then the paragraph after it (in case there is more content) but it might not always be applicable.
Create an account or sign in to comment.
[SOLVED]
I need to perform a transformation on a content nodes html output and the Ninja technique seemed perfect for this.
I thought I had it all figured out but have noticed oddities with the 'p' tags not containing the correct child nodes and what should be inside the child nodes are actually appearing at the same level in the tree.
My DATA
My XSLT
Expected Output
Actual Output
As you can see.. nothing is contained within the P tag further than one level deep..
When I use http://xslttest.appspot.com/ to parse my XSLT it works as expected, but when using Symphony it doesn't perform the same transform..
I'm using Symphony 2.6.2 at present. Any pointers?