given this XML:
<?xml version="1.0" ?>
<?xml-stylesheet type="text/css" href="test01.css"?>
<!DOCTYPE TEST_CASE_01 [
<!ELEMENT TEST_CASE_01 (UNB01,UNB02) >
<!ELEMENT UNB01 ANY>
<!ELEMENT UNB02 ANY>
]>
<TEST_CASE_01>
<UNB01>yes</UNB01>
<UNB02>no</UNB02>
</TEST_CASE_01>
and the following stylesheet:
TEST_CASE_01 {color:blue}
UNB01 {color:red}
UNB02 {color:green}
Internet explorer renders:
The XML page cannot be displayed
Cannot view XML input using CSS style sheet. Please correct the error
and then click the Refresh button, or try again later.
--------------------------------------------------------------------------------
Text is not allowed in this element according to DTD/Schema. Expecting:
UNB01. Line 11, Position 6
<UNB01>yes</UNB01>
-----^
So, as you can see, the string "<UNB01>" etc is
taken as TEXTual content which
is not allowed in the <TEST_CASE_01> container.
HOWEVER ! ........
by simply changing
<!ELEMENT TEST_CASE_01 (UNB01,UNB02) >
to
<!ELEMENT TEST_CASE_01 ANY >
I would now expect IE to render ...
<UNB01>yes</UNB01> no
but instead Internet Explorer now renders ...
yes no
(where "yes" is in red and "no" is in green per the style sheet).
So, do you see my delema? In the first case "<UNB01>"
is treated like TEXT, hence the error. So, we change the DTD
to ALLOW TEXT. The result ... "<UNB01>" is not
treated like text, but is treated as though it is a regular
XML element, as witnessed by 1) the lack of rendering of
"<UNB01>" and "</UNB01>" and 2) the specification in the style sheet
being applied.
Is this a bug? Is this the way it is supposed to work?
Since I am parsing XML I need to know if I should treat
items such as "<UNB01>" as text, or if I should
make the symbolic substitution and treat it just the
same as if I received "<UNB01>".
Thanks
Mike
__________________________________________________
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com
==========================================
XML/EDI Group members-only discussion list
Homepage = http://www.xmledi.org
Brought to you by: Online Technologies Corporation
Home of BizServe - www.bizserve.com
TO UNSUBSCRIBE: Send email to <[EMAIL PROTECTED]>
Leave the subject blank, and
In the body of the message, enter ONLY: unsubscribe
Questions/requests should be sent to: [EMAIL PROTECTED]
To join the XML/EDI Group complete the form located at:
http://www.geocities.com/WallStreet/Floor/5815/mail1.htm