Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Browsers XSLT handling when there are two xml-stylesheet PI

From: "gdelfino@-----.---" <--------@-----.--->
To: NULL
Date: 3/3/2006 3:11:00 PM
I have an XML file which I transform into XHTML using stylesheetA.xsl.
I also have stylesheetB.xsl which transforms my XML file into an Excel
XML document.

As both Excel and most new browsers have a built in XSTL engine, I
decided to add the stylesheet information to the original XML file.
Like this

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<?xml-stylesheet href="stylesheetA.xsl" type="text/xsl" media="excel"?>
<?xml-stylesheet href="stylesheetB.xsl"  type="text/xsl"
media="screen"?>
<blahblah>
... etc ...
</blahblah>

When I open the XML file with Excel, it asks me which of the two
stylesheets to use, which is great.

When I use Firefox 1.5.0.1 to open the XML file, it just uses the
*second* stylesheet (stylesheetB.xls) without asking. So far so good.

Internet Explorer 6, and Safari 2.0.3 use the *first* stylesheet (the
wrong one) without asking.

So, if I am to embbed the stylesheet information, I need to do it one
way for Firefox, and in a different way for Internet Explorer and
Safari.

It seems to me that:

1) Firefox should use the first stylesheet, like Intenet Explorer and
Safari.

2) The media attribute should be used to allow all applications know
which stylesheet to use. I invented the media="excel", but I understand
that web browsers should choose the stylesheet with the media="screen"
attribute.

Any comments?

Regards,

Gustavo Delfino
Caracas, Venezuela



transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent