[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
A little experiment to compare external entities and XInclude
- From: "Costello, Roger L." <costello@mitre.org>
- To: "xml-dev@lists.xml.org" <xml-dev@lists.xml.org>
- Date: Mon, 16 Aug 2010 10:33:01 -0400
Hi Folks,
I did a little experiment.
I dragged and dropped this into Internet Explorer:
-----------------------------------------------
<?xml version="1.0"?>
<!DOCTYPE BookStore [
<!ENTITY Siddhartha SYSTEM "Siddhartha.xml">
]>
<BookStore>
&Siddhartha;
</BookStore>
-----------------------------------------------
The browser resolved the external entity reference and this is what I saw:
<?xml version="1.0" ?>
<!DOCTYPE BookStore (View Source for full doctype...)>
<BookStore>
<Book>
<Title>Siddhartha</Title>
<Author>Hermann Hess</Author>
<Date>1951</Date>
<ISBN>0-553-20884-5</ISBN>
<Publisher>Bantam Books</Publisher>
</Book>
</BookStore>
Next, I dragged and dropped this into Internet Explorer:
-----------------------------------------------
<?xml version="1.0"?>
<BookStore xmlns:xi="http://www.w3.org/2001/XInclude">
<xi:include href="Siddhartha.xml" parse="xml">
<xi:fallback />
</xi:include>
</BookStore>
-----------------------------------------------
The browser did NOT resolve the XInclude reference. I saw no change.
I repeated the experiment with the Firefox browser and it exhibited the same behavior as Internet Explorer.
QUESTIONS
1. What should I conclude from this little experiment? Should I conclude that the browsers support external entities but do not support XInclude?
2. <xi:include> elements are resolved by the XML parser, correct? By "resolve" I mean that the <xi:include> element is replaced by the contents of the file it references.
3. The XML parsers in IE and Firefox do not support XInclude, correct?
4. The XML parser in IE is MSXML, correct?
5. What is the XML parser in Firefox?
6. What XML parsers support XInclude?
/Roger
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]