Connecting Tech Pros Worldwide Help | Site Map

xml element reference

  #1  
Old December 5th, 2005, 06:25 PM
stefano
Guest
 
Posts: 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

  #2  
Old December 5th, 2005, 06:35 PM
Martin Honnen
Guest
 
Posts: n/a

re: xml element reference




stefano wrote:
[color=blue]
> I have a file xml(p.xml) whit XSLT stylesheet import (for xhtml
> trasformation).[/color]

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?
[color=blue]
> 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.[/color]

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/
  #3  
Old December 5th, 2005, 06:35 PM
stefano
Guest
 
Posts: n/a

re: xml element reference


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

  #4  
Old December 5th, 2005, 06:55 PM
Martin Honnen
Guest
 
Posts: n/a

re: xml element reference




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

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/
Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
C# updating xml element chathura86 answers 4 December 4th, 2007 06:22 AM
help! Error: The XML element is already in the current scope... namewitheldbyrequest@gmail.com answers 3 August 1st, 2006 05:45 PM
the reference of the content of XML element mavis answers 5 June 1st, 2006 03:55 AM
Read contents of XML element Philip Wagenaar answers 3 November 21st, 2005 09:56 PM