xerces-j-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Java Xml Dev" <javaxml_...@hotmail.com>
Subject Re: Problem in XML/DTD
Date Wed, 24 Oct 2001 05:24:40 GMT
Although I did do this long back I just wanted if somebody could confim 
this. Hmmm so it is not possible(& this is really bad. No meaning of CDATA 
is parser is parsing it) Anyway.
  But if this is not possible then how come JSP can allow such characters in 
its attributes.It is also XML based & XML Compliant esp. JSP 1.2 where u can 
write a JSP Document which is 100% XML compliant.
Anyidea how those guys are or would be doing it.What I would like to achive 
is to allow JSP <%= or <% etc inside my atttributes which will be inserted 
into JSP page at compiletime & so should work.

Thanks,
Jiger


>From: Vlad.Epshtein@bmo.com
>To: javaxml_dev@hotmail.com
>Subject: Re: Problem in XML/DTD
>Date: Tue, 23 Oct 2001 10:35:52 -0400
>
>I believe the common rule is that characters "<", ">" and "&" in xml must
>be encoded with sequences "&lt;", "&gt;" and "&amp;".
>Try : <item name="orders" label="&lt;center&gt;Orders&lt;/center&gt;">
>
>- vlad
>
>
>
>Please respond to xerces-j-user <xerces-j-user@xml.apache.org>
>To:     xerces-j-user <xerces-j-user@xml.apache.org>
>cc:
>
>Subject:        Problem in XML/DTD
>
>Hi All,
>         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: xerces-j-user-unsubscribe@xml.apache.org
>For additional commands, e-mail: xerces-j-user-help@xml.apache.org
>
>
>
>


_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org


Mime
View raw message