none
XML XSL Transform Renders Only Text

    Question

  • Hello,

    Why is that in IE 10 when I open a XML file that has a reference to an XSL file (to perform a self-transformation on the XML file), the transformed XML output doesn't render as XML output with the "tags", but instead, it displays the node's data content as raw text?

    I've used older versions of IE to see the resulting (transformed) XML output (that was years ago... maybe it was 8?) and this was working. Am I missing anything? Is it an IE10 issue? What version works?

    Thanks in advance,

    Rick

    Wednesday, December 9, 2015 10:30 PM

Answers

  • Hello,

    Thank you to all of you who posted helpful hints to help me out. My browser nor the encoding--which I was wrongly suspecting--weren't the problem. The problem I was having was that I needed to add a namespace in the XSL file, and prefix all my references in the XSLT code to nodes in the XML file with their namespace. It looks like this now, and it works:

     

    <xsl:stylesheet version="1.0"
                    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                    xmlns:RNS="Report01DataSchema"
                    >

    and the nodes are referenced like this:

     

              <EmployeeNumber>
                <xsl:value-of select="RNS:EmployeeNumber"/>
              </EmployeeNumber>
              <FirstName>
                <xsl:value-of select="RNS:FirstName"/>
              </FirstName>
              <LastName>
                <xsl:value-of select="RNS:LastName"/>
              </LastName>

     

    Thank you!

     

    Rick

     

    Wednesday, December 16, 2015 9:25 PM

All replies

  • Hi Rick,

    Could you please give us the test link so that we could do the test for you?  

    Before we know that, we suggest you go to Internet Explorer interface, then click "Tools" > "Internet Options" > "Programs" > "Set association". Click "Select All" and "Save".

    After that, click "Tools" > ”Internet Options" > "Programs" > "Associate a file type or protocol with a program". Then find ".XML" file in the list and click "Change program". After that, choose Internet Explorer as the default program to open it.

    Hope that will be helpful to you.

    Best Regards

    Simon


    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact tnmff@microsoft.com.

    Thursday, December 10, 2015 2:19 AM
    Moderator
  • Hi,

    We wonder if there is any luck your issue has been resolved, if you've found solution by yourself. We would appreciate it if you could share with us and we will mark it as answer.

    Best Regards

    Simon


    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact tnmff@microsoft.com.

    Tuesday, December 15, 2015 7:25 AM
    Moderator
  • Hi,

    xmldataislands are supported in IE9 and earlier (see https://msdn.microsoft.com/library/ms766512.aspx ).

    to test using IE10 press f12 to display the developer tool... select the Emulation tab and change the documentMode setting to 9 or lower.

    to support legacy features in your organizations' intranets , you should upgrade to IE11 and deploy Enterprise Mode Site lists....

    https://blogs.msdn.microsoft.com/ie/2014/04/02/stay-up-to-date-with-enterprise-mode-for-internet-explorer-11/

    this will enable you to still support legacy features using the latest version of IE... (EML is only available for os versions running IE11(win7,8+,10) without having to always use the developer tool, compatibility view or x-ua headers.

    Regards.


    Rob^_^

    Wednesday, December 16, 2015 1:54 AM
  • Hello,

    Thank you to all of you who posted helpful hints to help me out. My browser nor the encoding--which I was wrongly suspecting--weren't the problem. The problem I was having was that I needed to add a namespace in the XSL file, and prefix all my references in the XSLT code to nodes in the XML file with their namespace. It looks like this now, and it works:

     

    <xsl:stylesheet version="1.0"
                    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                    xmlns:RNS="Report01DataSchema"
                    >

    and the nodes are referenced like this:

     

              <EmployeeNumber>
                <xsl:value-of select="RNS:EmployeeNumber"/>
              </EmployeeNumber>
              <FirstName>
                <xsl:value-of select="RNS:FirstName"/>
              </FirstName>
              <LastName>
                <xsl:value-of select="RNS:LastName"/>
              </LastName>

     

    Thank you!

     

    Rick

     

    Wednesday, December 16, 2015 9:25 PM