displaying in netscape

Discussion in 'XML' started by Stephen, Apr 20, 2004.

  1. Stephen

    Stephen Guest

    I have an xml document with a xsl stylesheet. It will display the
    styles in explorer, but not in netscape 7.1

    <?xml version="1.0" standalone="no"?>
    <!DOCTYPE home SYSTEM "A:\xmlproject\home.dtd">
    <?xml-stylesheet
    type="text/xsl"
    href="A:\xmlproject\home.xsl"?>

    Any ideas why?

    Thanks

    Steve
     
    Stephen, Apr 20, 2004
    #1
    1. Advertising

  2. Stephen

    Derek Harmon Guest

    "Stephen" <> wrote in message news:...
    > I have an xml document with a xsl stylesheet. It will display the
    > styles in explorer, but not in netscape 7.1

    : :
    > href="A:\xmlproject\home.xsl"?>
    >
    > Any ideas why?


    Yes, when referencing an absolute filespec as a URL, use file://
    to specify the protocol as being the local filesystem:

    <?xml-stylesheet type="text/xsl" href="file://A:\xmlproject\home.xsl" ?>

    "A:\" is meaningful to Microsoft disk operating systems, so its
    understandable Internet Explorer accepts it and others do not.


    Derek Harmon
     
    Derek Harmon, Apr 20, 2004
    #2
    1. Advertising

  3. Stephen

    Stephen Guest

    "Derek Harmon" <> wrote in message news:<c61t54$72of7$-berlin.de>...
    > "Stephen" <> wrote in message news:...
    > > I have an xml document with a xsl stylesheet. It will display the
    > > styles in explorer, but not in netscape 7.1

    > : :
    > > href="A:\xmlproject\home.xsl"?>
    > >
    > > Any ideas why?

    >
    > Yes, when referencing an absolute filespec as a URL, use file://
    > to specify the protocol as being the local filesystem:
    >
    > <?xml-stylesheet type="text/xsl" href="file://A:\xmlproject\home.xsl" ?>
    >
    > "A:\" is meaningful to Microsoft disk operating systems, so its
    > understandable Internet Explorer accepts it and others do not.
    >
    >
    > Derek Harmon


    Now the message "Error loading stylesheet: Parsing a XSLT stylesheet
    failed" is displayed. Is there a problem with the stylesheet?

    <?xml version="1.0"?>
    <xsl:stylesheet
    xmlns:xsl="http://www.w3.org/TR/WD-xsl"
    xmlns="http://www.w3.org/TR/REC-html40"
    result-ns="">

    <xsl:template>
    <html>
    <head>
    <meta http-equiv="Content-Type"
    content="text/html; charset=iso-8859-1"/>
    <style type="text/css">


    A:link{
    COLOR: Navy;
    text-decoration: none
    }

    A:visited{
    COLOR: Navy
    }

    A:active{
    COLOR: blue
    }

    #NavText{
    font-weight: bold;
    font-size: 20px;
    text-decoration: none;
    font-family: "Times New Roman", "Garamond", "serif"
    }

    #NavHead{
    font-weight: bold;
    font-size: 24px;
    text-align: center;
    text-decoration: none;
    font-family: "Times New Roman", "Garamond", "serif";
    color: white;
    display: block;
    background-color: navy;
    border-style: outset;
    margin-left: 2%; margin-right: 2%
    }

    .headline{
    font-size: 50px;
    color: #FF0000;
    background-color: #FFFFFF;
    text-transform: Capitalize;
    text-align: Left
    }

    .deck{
    font-style: italic;
    font-size: 20px;
    font-weight: bold;
    color: red;
    margin-left: 65px;
    font-family: "Arial", "helvetica", "sans-serif";
    text-align: Right
    }



    .copyright{
    color: Red;
    font-weight: normal;
    font-size: 10px;
    font-family: Arial, helvetica, sans-serif
    }

    .hbody{
    display: block;
    font-weight: bold;
    font-size: 18px;
    font-family: "Ariel","Garamond", "serif"
    }

    .cbody{
    display: block;
    font-weight: normal;
    font-size: 18px;
    font-family: "Ariel","Garamond", "serif"
    }


    .dropcap{
    background: white;
    color: red;
    float: left;
    vertical-align: text-top;
    font-size: 24px;
    font-weight: bold;
    border: none
    }

    .bold{
    font-style: bold
    }

    .ital{
    font-style: italic
    }


    #boxcopy{
    color: yellow;
    background-color: red;
    vertical-align: text-bottom;
    font-size: 40px;
    font-style: bold;
    font-family: "Times New Roman","serif", "Garamond";
    padding-left: 1px;
    padding-right: 3px;
    text-decoration: none;
    border: none
    }

    #boxcopy1{
    color: white;
    background-color: gray;
    vertical-align: text-top;
    font-size: 24px;
    font-style: bold;
    text-decoration: none;
    border: inset
    }

    #boxcopy2{
    color: navy;
    background-color: white;
    float: right;
    vertical-align: text-top;
    font-size: 20px;
    font-style: bold;
    border: none
    }

    </style>

    <title>
    <xsl:value-of select="home/headline"/>
    </title>

    </head>

    <body>

    <TABLE>
    <TR>
    <TD WIDTH="200" HEIGHT="211"
    BACKGROUND="file://A:\xmlproject\bg03.gif"
    VALIGN="TOP" ALIGN="CENTER">

    <Span id="NavHead" ALIGN="CENTER">Browse Manchester OnLine
    Flights</Span>
    <br/><br/>
    <P>
    <A HREF="file://A:\xmlproject\homepage.xml" TARGET="_top">
    <SPAN id="NavText">Home Page</SPAN>
    </A>
    </P>
    <P>
    <A HREF="file://A:\xmlproject\aboutus.xml" TARGET="_top">
    <SPAN id="NavText">About Us</SPAN>
    </A>
    </P>

    <P>
    <A HREF="file://A:\xmlproject\contactus.xml" TARGET="_top">
    <SPAN id="NavText">Contact Us</SPAN>
    </A>
    </P>

    <P>
    <A HREF="file://A:\xmlproject\search.xml" TARGET="MainPane">
    <SPAN id="NavText">Search Flights</SPAN>
    </A>
    </P>

    <br/><br/><br/><br/><br/><br/><br/>
    <Span ID="boxcopy1">
    <img SRC="file://A:\xmlproject\globe2.gif"
    ALT="Logo" ALIGN="MIDDLE"
    WIDTH="110" HEIGHT="90">
    </img>
    </Span>

    </TD>

    <TD WIDTH="40" HEIGHT="211" BGCOLOR="#FFFFFF" VALIGN="TOP"></TD>
    <TD WIDTH="480" HEIGHT="211" BGCOLOR="#FFFFFF" VALIGN="TOP">

    <P><BR></BR>
    <IMG SRC="file://A:\xmlproject\globewithtext.gif"
    ALT="Logo" ALIGN="MIDDLE"
    WIDTH="500" HEIGHT="200">
    </IMG>
    </P>

    <Span ID="BoxCopy">
    <xsl:value-of select="contact/headline"/>
    </Span><BR></BR>
    <Span ID="BoxCopy">
    <xsl:value-of select="home/headline"/>
    </Span><BR></BR>
    <hr/>
    <DIV Class="deck">
    <xsl:value-of select="contact/deck"/>
    </DIV>
    <DIV Class="deck">
    <xsl:value-of select="home/deck"/>
    </DIV>
    <BR></BR>

    <DIV Class="hbody">
    <P><xsl:value-of select="home//hbody/para1"/></P>
    <P><xsl:value-of select="home//hbody/para"/></P>
    <P><xsl:value-of select="home//hbody/para2"/></P>
    </DIV>

    <DIV Class="cbody">
    <P><xsl:value-of select="contact//cbody/par1"/></P>
    <P><xsl:value-of select="contact//cbody/par"/></P>
    <P><xsl:value-of select="contact//cbody/par2"/></P>
    </DIV>
    </TD></TR>
    </TABLE>

    <P ALIGN="CENTER"><FONT SIZE="-1"> [<A
    HREF="file://A:\xmlproject\aboutus.xml">About Us</A>]
    [<A HREF="file://A:\xmlproject\contactus.xml">Contact US</A>]
    [<A HREF="file://A:\xmlproject\search.xml">Search Flights</A>]
    [<A HREF="file://A:\xmlproject\homepage.xml">Home Page</A>]
    </FONT>
    </P>
    <HR></HR>

    <P><xsl:value-of select="home/copyright"/></P>

    </body>
    </html>
    </xsl:template>

    <xsl:template match="cbody">
    <P>
    <xsl:apply-templates/>
    </P>
    </xsl:template>

    </xsl:stylesheet>

    Thanks

    Steve
     
    Stephen, Apr 20, 2004
    #3
  4. Stephen wrote:
    > Now the message "Error loading stylesheet: Parsing a XSLT stylesheet
    > failed" is displayed. Is there a problem with the stylesheet?


    Yes.

    > <?xml version="1.0"?>
    > <xsl:stylesheet
    > xmlns:xsl="http://www.w3.org/TR/WD-xsl"


    This is not XSLT. XSLT's namespace is
    'http://www.w3.org/1999/XSL/Transform'.

    > xmlns="http://www.w3.org/TR/REC-html40"


    HTML 4.0 has no namespace.

    > result-ns="">


    There is no attribute result-ns.

    I didn't look at the code any further.
    --
    Johannes Koch
    In te domine speravi; non confundar in aeternum.
    (Te Deum, 4th cent.)
     
    Johannes Koch, Apr 20, 2004
    #4
  5. Stephen wrote:


    > Now the message "Error loading stylesheet: Parsing a XSLT stylesheet
    > failed" is displayed. Is there a problem with the stylesheet?
    >
    > <?xml version="1.0"?>
    > <xsl:stylesheet
    > xmlns:xsl="http://www.w3.org/TR/WD-xsl"


    That namespace http://www.w3.org/TR/WD-xsl is not the correct namespace
    to use XSLT 1.0, to use XSLT 1.0 you need the namespace
    http://www.w3.org/1999/XSL/Transform. The WD-xsl is a working draft
    predecessor to XSLT 1.0 with syntatical and semantical differences and
    shouldn't be used any longer if you want to transform documents as the
    standardized language XSLT 1.0 is supported by lot of processors whereas
    WD-xsl is only supported by the standard installation of IE5 (and maybe
    IE5.5). You can however install MSXML 3 in replace mode for IE5 to make
    IE5 support XSLT 1.0.

    As for using XSLT with Mozilla/Netscape see the faq at
    http://www.mozilla.org/projects/xslt/faq.html
    --

    Martin Honnen
    http://JavaScript.FAQTs.com/
     
    Martin Honnen, Apr 20, 2004
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Duncan Godwin
    Replies:
    0
    Views:
    886
    Duncan Godwin
    Jun 25, 2003
  2. Cy Huckaba
    Replies:
    0
    Views:
    903
    Cy Huckaba
    Jun 25, 2003
  3. Tom
    Replies:
    0
    Views:
    513
  4. Mickey Segal
    Replies:
    1
    Views:
    691
    Mickey Segal
    May 21, 2004
  5. yaktipper
    Replies:
    10
    Views:
    304
    Richard Cornford
    Jul 10, 2003
Loading...

Share This Page