[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

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

A little experiment to compare external entities and XInclude
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]


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.