Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > displaying in netscape

Reply
Thread Tools

displaying in netscape

 
 
Stephen
Guest
Posts: n/a
 
      04-19-2004
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
 
Reply With Quote
 
 
 
 
Derek Harmon
Guest
Posts: n/a
 
      04-20-2004
"Stephen" <(E-Mail Removed)> wrote in message news:(E-Mail Removed) ...
> 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


 
Reply With Quote
 
 
 
 
Stephen
Guest
Posts: n/a
 
      04-20-2004
"Derek Harmon" <(E-Mail Removed)> wrote in message news:<c61t54$72of7$(E-Mail Removed)-berlin.de>...
> "Stephen" <(E-Mail Removed)> wrote in message news:(E-Mail Removed) ...
> > 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
xmlnssl="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
 
Reply With Quote
 
Johannes Koch
Guest
Posts: n/a
 
      04-20-2004
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
> xmlnssl="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.)
 
Reply With Quote
 
Martin Honnen
Guest
Posts: n/a
 
      04-20-2004


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
> xmlnssl="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/

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Netscape 7.1 to Netscape 8 Skid Schermerhorn Firefox 2 09-05-2005 04:04 PM
Can't access Netscape mail with Netscape email client anymore. Mark Adams Computer Support 6 03-14-2005 03:31 PM
Accessing Netscape mail via Netscape mail client A. Toprak Computer Support 0 12-24-2004 06:46 AM
Netscape with JRE 1.5 beta 1 ignores Netscape signing Mickey Segal Java 1 05-21-2004 01:52 PM
websphere, oracle, netscape: netscape timeout Tom Java 0 08-01-2003 11:03 PM



Advertisments