Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Does IE/Firefox browser validate a give XML with DTD

843834Apr 4 2007 — edited Apr 5 2007
Hi,
The following is my XML with an internal DTD and below that is the css
<?xml version="1.0" ?>
<!DOCTYPE INVENTORY
[
<!ELEMENT INVENTORY (BOOK)+ >
<!ELEMENT BOOK (NAME,PRICE)>
<!ELEMENT NAME (#PCDATA)>
<!ELEMENT PRICE (#PCDATA)>
<!ELEMENT IMAGE EMPTY>
]
>
<?xml-stylesheet type="text/css" href="Inventory01.css"?>


<INVENTORY>
<BOOK>
	<NAME> 101 Thins to lie </NAME>
	<PRICE> 9494.03</PRICE>
	<IMAGE> TEST </IMAGE>
</BOOK>
<BOOK>
	<NAME> iT nEVER Gets Better </NAME>
	<PRICE> 44.43</PRICE>
</BOOK>
</INVENTORY>
The following is the CSS file refered above.
BOOK
{
	display:block;
	margin-top:12pt;
	font-size:10pt
}
NAME
{
	display:block;
	margin-top:12pt;
	font-weight:bold;
	font-style:italic;
}
PRICE
{
	display:block;
	margin-left:15pt;
}
I was expecting the browser to validate my XML and give me an error. Please tell me if the browsers validate XMLs? If yes, is there any issue with the above code.

Thanks.
Regards,
Technoz
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 3 2007
Added on Apr 4 2007
2 comments
199 views