Netscape, xml problem

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Pavel

    #1

    Netscape, xml problem

    Greetings to all,

    I need use different xsl stylesheet files with the same xml data. I
    haven't been able to make the following xml include working under NN7:

    ---cut----
    <?xml version="1.0" encoding="UTF-8"?>
    <?xml-stylesheet type="text/xsl" href="contacts. xsl"?>
    <!DOCTYPE companies [
    <!ENTITY contacts SYSTEM "contacts.x ml">
    ]>

    <wrapper>
    &contacts;
    </wrapper>
    ---cut----

    It works in IE6.... Not that it's important ;-)

    contacts.xml looks like (with no xml header):
    <companies>
    <company ...>
    ...
    </company>
    ...
    </companies>

    What am I doing wrong? Or it's not supported by NN?

    Any suggestions are very appreciated.
    Thank you.
    Pavel
  • Martin Honnen

    #2
    Re: Netscape, xml problem



    Pavel wrote:

    [color=blue]
    > I need use different xsl stylesheet files with the same xml data. I
    > haven't been able to make the following xml include working under NN7:
    >
    > ---cut----
    > <?xml version="1.0" encoding="UTF-8"?>
    > <?xml-stylesheet type="text/xsl" href="contacts. xsl"?>
    > <!DOCTYPE companies [
    > <!ENTITY contacts SYSTEM "contacts.x ml">
    > ]>
    >
    > <wrapper>
    > &contacts;
    > </wrapper>
    > ---cut----
    >
    > It works in IE6.... Not that it's important ;-)
    >
    > contacts.xml looks like (with no xml header):
    > <companies>
    > <company ...>
    > ...
    > </company>
    > ...
    > </companies>
    >
    > What am I doing wrong? Or it's not supported by NN?[/color]

    Netscape's XML parser doesn't support external entities, it doesn't have
    to as it is a non-validating parser:
    http://www.w3.org/TR/2004/REC-xml-20040204/#proc-types

    --

    Martin Honnen
    http://JavaScript.FAQTs.com/

    Comment

    • Pavel

      #3
      Re: Netscape, xml problem

      Is there any way I can use the same xml file with multiple stylesheets
      in NN7 w/out server side xslt processing ?
      Thanks
      Pavel[color=blue]
      >
      > Netscape's XML parser doesn't support external entities, it doesn't have
      > to as it is a non-validating parser:
      > http://www.w3.org/TR/2004/REC-xml-20040204/#proc-types[/color]

      Comment

      • Martin Honnen

        #4
        Re: Netscape, xml problem



        Pavel wrote:
        [color=blue]
        > Is there any way I can use the same xml file with multiple stylesheets
        > in NN7 w/out server side xslt processing ?[/color]

        You can script XSLT transformation, see
        An XSLTProcessor applies an XSLT stylesheet transformation to an XML document to produce a new XML document as output. It has methods to load the XSLT stylesheet, to manipulate parameter values, and to apply the transformation to documents.

        that way you can certainly use different stylesheets.

        --

        Martin Honnen
        http://JavaScript.FAQTs.com/

        Comment

        Working...