473,325 Members | 2,671 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,325 software developers and data experts.

xml-stylesheet referenc problem

Hi to all!

Situation:

First document (data.xml):

<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="data.xsl"?>
<data xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >
....

</data>

Second document (data.xsl)
<?xml version='1.0' encoding='utf-8'?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html"/>

<xsl:template match="/">
....
</xsl:template>

</xsl:stylesheet>
when these two documents are in same directory on my local disk
everyting is OK, BUT what I want is:
data.xml is on my local disk
data.xsl is somewhere on web (http://www.myweb.com/data.xsl)
load to my web browser (firefox) data.xml and see tranformed data via
data.xsl

then data.xml will look like
<?xml-stylesheet type="text/xsl" href="http://www.myweb.com/data.xsl"?>
and data.xsl is on http://www.myweb.com/data.xsl

This combination dont work!

What I am doing wrong?

Jan 19 '06 #1
1 1274


tj******@gmail.com wrote:

BUT what I want is:
data.xml is on my local disk
data.xsl is somewhere on web (http://www.myweb.com/data.xsl)
load to my web browser (firefox) data.xml and see tranformed data via
data.xsl

then data.xml will look like
<?xml-stylesheet type="text/xsl" href="http://www.myweb.com/data.xsl"?>
and data.xsl is on http://www.myweb.com/data.xsl


For security reasons browsers often disallow using/combining resources
from different origins. I am sure Firefox will not allow an XML document
on e.g. http://example.com/ to load an XSLT stylesheet from e.g.
http://example.org/. Whether it also disallows access to stylesheets on
the web for local XML document I am not sure but that could be the problem.
The only other problem I see could be MIME types, make sure that web
server serves the data.xsl with HTTP Content-Type application/xml or
text/xml, see the Mozilla XSLT FAQ:
<http://www.mozilla.org/projects/xslt/faq.html>

--

Martin Honnen
http://JavaScript.FAQTs.com/
Jan 19 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Robert J Egan | last post by:
Hi i'm trying to search a remote website page. The form returns xml information, though the page extension is missing. I retrieve the information and write it to the screen. So far so good -...
1
by: felipe_azv | last post by:
a got this code in asp to construct a xml , to export it to a url this is de asp code: <% SQL = "Select * from User where CodeUser in ("& request.form("C1" &")" set rs =...
0
by: MarionEll | last post by:
Premier XML Industry Event Slated for Dec. 7-12 in Philadelphia; Presenters Include Adobe, BEA, Microsoft, IBM, Sun, Hewlett-Packard, Oracle Alexandria, Va. Sept. 30, 2003 - IDEAlliance, a...
6
by: yzzzzz | last post by:
Hi, In which cases is the <?xml version="1.0" encoding="UTF-8"?> processing instruction required at the beginning of an XML document, for the document to be valid? e.g. does it depend on the...
3
by: David L | last post by:
Hi, I am wondering that whether the fact that as more tools/environments/products support XML, then the need for knowing XML itself gets less important. I am comparing xml to assembler. IT...
0
by: MarionEll | last post by:
XML 2004 to Focus on Government XML Applications Expanded Government Track to Highlight XML Applications in U.S. and Abroad; XML.gov, KM.gov, CIO Council, and SICoP to Co-Host Event ...
0
by: Stylus Studio | last post by:
World's Most Advanced XML Schema Editor Adds Support for IBM AlphaWorks XML Schema Quality Checker to Improve XML Schema Style and Quality BEDFORD, MA -- 09/13/2005 -- Stylus Studio...
0
by: UncleRic | last post by:
Environment: Mac OS X (10.4.10) on MacBook Pro I'm a Perl Neophyte. I've downloaded the XML::Parser module and am attempting to install it in my working directory (referenced via PERL5LIB env): ...
9
by: Lie | last post by:
Why this generates AttributeError, then not? Python 2.5.2 (r252:60911, Apr 21 2008, 11:17:30) on linux2 Type "help", "copyright", "credits" or "license" for more information. Traceback (most...
0
by: Jacker | last post by:
Xpress Author for MS Word XML Documents In.vision Research empowers knowledge workers to create complex XML documents in Microsoft Word (2000-2003) with a normal Word experience. Deploy XML...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.