displaying in netscape

S

Stephen

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
 
D

Derek Harmon

Stephen said:
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
 
S

Stephen

Derek Harmon said:
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
 
J

Johannes Koch

Stephen said:
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'.

HTML 4.0 has no namespace.
result-ns="">

There is no attribute result-ns.

I didn't look at the code any further.
 
M

Martin Honnen

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,825
Latest member
VernonQuy6

Latest Threads

Top