By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,461 Members | 1,108 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,461 IT Pros & Developers. It's quick & easy.

xml element reference

P: n/a
I have a file xml(p.xml) whit XSLT stylesheet import (for xhtml
trasformation).
I want have a reference to the xml elements of p.xml from another
javascript file.If I use win.open(p.xml....) method I have a reference
to XHTML elements.
How can I do?
thanks

Dec 5 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a


stefano wrote:
I have a file xml(p.xml) whit XSLT stylesheet import (for xhtml
trasformation).
Import? Do you have a pseudo processing instruction
<?xml-stylesheet type="text/xsl" href="stylesheet.xml"?>
to for instance have the browser do a client-side XSLT transformation
automatically when the XML document is loaded?
Or what kind of import do you use?
I want have a reference to the xml elements of p.xml from another
javascript file.If I use win.open(p.xml....) method I have a reference
to XHTML elements.


IE/Win exposes the original XML document that has been transformed as
document.XMLDocument
Firefox/Mozilla so far don't do that so there you need to use script to
load the XML file only from a URL.
--

Martin Honnen
http://JavaScript.FAQTs.com/
Dec 5 '05 #2

P: n/a
yes, I have a pseudo processing instruction <?xml-stylesheet
type="text/xsl" href="stylesheet.xml"?> and I use Firefox

Dec 5 '05 #3

P: n/a


stefano wrote:
I have a pseudo processing instruction <?xml-stylesheet
type="text/xsl" href="stylesheet.xml"?> and I use Firefox


Then don't load the XML into a browser window but load it with script,
that way you get access to the DOM of the XML document and not to the
DOM of the transformation result.
Here is how you can load an XML document with script from a URL:
<http://www.faqts.com/knowledge_base/view.phtml/aid/6826/fid/616>
Of course if you also want to render the transformation result then you
need to do both, load the XML in a window and load it with script.
--

Martin Honnen
http://JavaScript.FAQTs.com/
Dec 5 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.