I have the below xml file & I hope I will get solution on this list. The xml file represents a menu to be dynamically generated. Now I want the "label" attribute to be something like this
<item name="orders" label="<center>Orders</center>">
But the Xerces 1.4.3 parser complains
org.xml.sax.SAXParseException: The value of attribute "label" must not contain the '<' character.
at org.apache.xerces.framework.XMLParser.reportError(Unknown Source)
at org.apache.xerces.framework.XMLDocumentScanner.reportFatalXMLError(Unknown Source)
at org.apache.xerces.framework.XMLDocumentScanner.scanAttValue(Unknown Source)
at org.apache.xerces.framework.XMLDocumentScanner.scanElement(Unknown Source)
at org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.framework.XMLDocumentScanner.parseSome(Unknown Source)
at org.apache.xerces.framework.XMLParser.parse(Unknown Source)
at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:161)
at SchemaTest.<init>(SchemaTest.java:29)
at SchemaTest.main(SchemaTest.java:10)
the menu.xml is like below
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE root [
<!ELEMENT root (menu)*>
<!ELEMENT menu (language*)>
<!ELEMENT language (item*)>
<!ATTLIST language code (en|fr) #REQUIRED>
<!ELEMENT color-config ANY>
<!ATTLIST menu
role (admin | acm | reseller | customer) #REQUIRED
<!ELEMENT item (item)*>
<!ATTLIST item
name CDATA #REQUIRED
label CDATA #REQUIRED
url CDATA ""
]>
<root>
<menu role="admin">
<language code="en">
<item name="orders" label="<center>Orders</center>">
<item name="list" label="List">
<item name="general" label="General"
url="view.jsp"/>
<item name="specific" label="Specific"
url="view.jsp"/>
</item>
<item name="add" label="Add" url="add.jsp"/>
</item>
<item name="profile" label="Profile">
<item name="view" label="View" url="view.jsp"/>
<item name="modify" label="Modify"
url="mod.jsp"/>
<item name="changePassword" label="Change Password"
url="view.jsp"/>
</item>
</language>
</menu>
</root>But if I remove <center> etc etc then it works fine. Now my question is that if label is declared as CDATA then it should work then why is it giving such a problem.
Can anyone help me.
Thanks in Advance, Jiger
_________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
