URL as XSL Reference

Discussion in 'XML' started by will, Sep 2, 2005.

  1. will

    will Guest

    All


    A quick question regarding referencing xsl stylesheets from XML..

    Up until now i have always refernced a stylesheet using a UNC eg

    <?xml-stylesheet type="text/xsl" href="\\lsgpic04\...

    Now i am looking at referencing the xsl using a URL eg

    <?xml-stylesheet type="text/xsl" href="http://gpmsbic...

    however this is failing with access is denied, error processing the
    resource (ie the xsl)

    So just to confirm .. can URLs be used as the xsl reference within XML?

    If this is perfectly acceptable then i guess it could be a permission
    issue

    Thanks in advance for your help

    Will
    will, Sep 2, 2005
    #1
    1. Advertising

  2. will wrote:


    > <?xml-stylesheet type="text/xsl" href="http://gpmsbic...
    >
    > however this is failing with access is denied, error processing the
    > resource (ie the xsl)
    >
    > So just to confirm .. can URLs be used as the xsl reference within XML?


    Sure the href is supposed to be a URL and not some UNC path, but

    > If this is perfectly acceptable then i guess it could be a permission
    > issue


    if you load an XML document with a <?xml-stylesheet>
    processing-instruction from a HTTP server then browsers usually with
    normal security settings only allow loading a stylesheet from the same
    HTTP server e.g. loading http://example.com/example.xml with the href
    for the stylesheet pointing to http://example.com/exampleSheet.xml is
    fine while the browser won't load a stylesheet from http://example.com/.

    --

    Martin Honnen
    http://JavaScript.FAQTs.com/
    Martin Honnen, Sep 2, 2005
    #2
    1. Advertising

  3. will

    will Guest

    Thanks Martin for the swift response

    Hmm the xml is on a local shared drive while the xsl is on a web server

    This works through xmlspy but not through internet explorer

    Any Clues?
    will, Sep 2, 2005
    #3
  4. will wrote:

    > Hmm the xml is on a local shared drive while the xsl is on a web server
    >
    > This works through xmlspy but not through internet explorer


    XML spy is a standalone application that does not impose security
    restrictions usually while Internet Explorer is a browser where usually
    many things are restricted. If you load the XML from the local file
    system and want IE to access the stylesheet on a web server then you
    need to configure IE to allow access to data source across domains.

    --

    Martin Honnen
    http://JavaScript.FAQTs.com/
    Martin Honnen, Sep 2, 2005
    #4
    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. Jon paugh
    Replies:
    1
    Views:
    695
  2. Kevin Flood
    Replies:
    0
    Views:
    1,016
    Kevin Flood
    Sep 8, 2004
  3. Kevin Flood
    Replies:
    1
    Views:
    2,727
    Kevin Flood
    Sep 13, 2004
  4. Replies:
    1
    Views:
    3,595
    A. Bolmarcich
    May 27, 2005
  5. Just D.
    Replies:
    0
    Views:
    410
    Just D.
    Aug 11, 2004
Loading...

Share This Page