Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. XML / XSL
  4. Firefox & XML

Firefox & XML

Scheduled Pinned Locked Moved XML / XSL
xmlcsharpjavascripthtmlcss
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    Bassam Abdul Baki
    wrote on last edited by
    #1

    I have an HTML file that loads an XML and XSL. If I open the file locally, it works. If I open it remotely, it fails. It works in IE both ways. My folder structure is like this. FILE.HTML ./includes/css/FILE.css ./includes/js/FILE.js ./includes/xml/FILE.xml --- (XML_file_name) --- ./includes/xsl/FILE.xsl --- (XSL_file_name) --- Here's the FF part of the code.

    // For Firefox. else if (document.implementation && document.implementation.createDocument) { // Load XSL. var processor = new XSLTProcessor(); var xslt = document.implementation.createDocument("", "", null); xslt.async = false; xslt.load(XSL_file_name); processor.importStylesheet(xslt); // Load XML. var src_doc = document.implementation.createDocument("","", null); src_doc.async = false; src_doc.load(XML_file_name); var result = processor.transformToDocument(src_doc); // Transform. var xmls = new XMLSerializer(); output = xmls.serializeToString(result); }

    Anyone knows why this won't work? Do all my XML and XSL have to be in the same path? Thanks!


    "I know which side I want to win regardless of how many wrongs they have to commit to achieve it." - Stan Shannon Web - Blog - RSS - Math - LinkedIn - BM

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups