Oh, ok. Sorry, I wasn't paying attention. Its in the internal subset. That
is definitely not legal. I was talking about something else, which would
probably show up in the C++ parser if you moved that internal subset to the
external subset, where what you are wanting to do is legal. I don't know
what the heck the Java parser is trying to tell you. IE is giving the
correct error, and C++ parser should give you that one as well.
But basically, in the internal subset, you can only include whole markup in
PE refs, i..e they have to be 'top level' out side of any other markup.
----------------------------------------
Dean Roddey
Software Weenie
IBM Center for Java Technology - Silicon Valley
[EMAIL PROTECTED]
"Watson, Tom" <[EMAIL PROTECTED]> on 04/20/2000 01:34:52 PM
Please respond to [EMAIL PROTECTED]
To: [EMAIL PROTECTED], "'David Bourget'" <[EMAIL PROTECTED]>
cc: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
Subject: RE: Resend - can ELEMENTS reference ENTITIES?
David,
thanks for the response.
Here is a code snippet and the accompanying error messages from Xerces
and Internet Explorer.
I believe you may be correct...I am trying to impose restrictions on
character
data...ensuring it is either a BUY or SELL code.
====================================my program======================
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE DOCUMENT [
<!ELEMENT transaction_file (transaction)* >
<!ELEMENT transaction (code)>
<!ENTITY % validCodeEnum "BOUGHT|SOLD">
<!ELEMENT code (%validCodeEnum;)>
]>
<!--notice second record has code=LEASE-->
<transaction_file>
<transaction>
<code>BOUGHT</code>
</transaction>
<transaction>
<code>LEASE</code>
</transaction>
</transaction_file>
====================================Xerces error======================
C:\xerces\java sax.SAXCount -v d:\Temp\petest.xml
[Fatal Error] petest.xml:6:17: A '<' character or an element type is
required in the
declaration of element type "code"
org.xml.sax.SAXException: Stopping after fatal error.....