Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • phenryll 28 posts 53 karma points
    Oct 23, 2010 @ 12:24
    phenryll
    0

    XSLT Visualizer: some elements not well-formed

    Hi all,

    I have been using Umbraco for a couple of months and I have tackled with both old and new schema. To look into how the xml is rendered, I use extensively <xslt:copy of />. I run Visualize XSLT to render the page I am working on and format the xml with XML Marker (because it is human readable).

    However XML Marker complains about Tags that are not closed. These not well-formed elements are properties correctly defined when creating the document types. Those properties are very common: UmbracoUrlName, UmbracoNaviHide, UmbracoInternalRedirectId. Here is the rendered markup :

    <umbracourlname><umbracourlalias><umbracoredirect><umbraconavihide>0</umbraconavihide><umbracointernalredirectid>

    Only the umbraconoavihide node is correctly formed

    It is a bug, isn't it? Can you guys tell me if there is a workaround?

    Thanks in advance.



    Roland

  • Kim Andersen 1447 posts 2196 karma points MVP
    Oct 23, 2010 @ 17:25
    Kim Andersen
    1

    Hi Roland

    Could you maybe try to print out the XML on the site instead of the visualizer?

    Eg. like this if you want to see the current page:

    <textarea>
    <xsl:copy-of select="$currentPage" />
    </textarea>

    Then copy the output into XML Marker once again. If it still doesn't work could you try copy/pasting it from the textarea and into another IDE (like Visual Studio, Dreamweaver etc. or even Notepad) and also in here, so we can see the output.

    Maybe you could also try to republish the entire site, just to be sure that everything is okay.

    /Kim A

  • Chriztian Steinmeier 2798 posts 8788 karma points MVP 8x admin c-trib
    Oct 23, 2010 @ 19:03
    Chriztian Steinmeier
    0

    Hi Roland,

    It's some kind of "Tidy-thingie" that munges the markup - you can use Kim's suggestion to output into a <textarea> inside the Visualizer - then the Tidy-thingie won't rewrite (lowercase) your tags...

    /Chriztian

  • phenryll 28 posts 53 karma points
    Oct 23, 2010 @ 20:32
    phenryll
    0

    Thanks guys, fetching everything inside a <textarea> node solves the issue :o Pretty strange inaccuracies.

    If I fetch $currentPage outside the textarea node, the document IS well-formed but the hierarchy is wrong. Document types are embedded whereas they are not. This explains why I noticed that some elements were not well-formed. I expected to find the close tag after the opening tag.

    Anyway I have learned something :p

    Thanks once again.

    NB: Chriztian are you going to update your XML Dump to  reflect the new schema?

  • Chriztian Steinmeier 2798 posts 8788 karma points MVP 8x admin c-trib
    Oct 23, 2010 @ 22:40
    Chriztian Steinmeier
    0

    Roland - (re: XML Dump) - there's an updated XSLT file you can download and use - it's mentioned on the project page. Just replace the existing one with the new one, and you've got the XML goodness in 4.5 too :-)

    But yes, there will be an "official" 4.5.x release in a not too distant future...

    /Chriztian 

  • phenryll 28 posts 53 karma points
    Oct 24, 2010 @ 09:12
    phenryll
    0

    Thanks Chriztian ;) I was focused on "Compatible with schema 4.0.x" and didn't read the first paragraph of the description... Shame on me lol

Please Sign in or register to post replies

Write your reply to:

Draft