[jboss-jira] [JBoss JIRA] Updated: (JBAS-460) Make *-service.xml 'validable'
Dimitris Andreadis (JIRA)
jira-events at jboss.com
Wed Sep 6 05:13:31 EDT 2006
[ http://jira.jboss.com/jira/browse/JBAS-460?page=all ]
Dimitris Andreadis updated JBAS-460:
------------------------------------
Fix Version/s: JBossAS-4.0.6.CR1
(was: JBossAS-4.0.5.GA)
> Make *-service.xml 'validable'
> ------------------------------
>
> Key: JBAS-460
> URL: http://jira.jboss.com/jira/browse/JBAS-460
> Project: JBoss Application Server
> Issue Type: Feature Request
> Security Level: Public(Everyone can see)
> Components: MicroContainer bus
> Affects Versions: JBossAS-4.0.0 Final
> Reporter: SourceForge User
> Assigned To: Scott M Stark
> Priority: Minor
> Fix For: JBossAS-4.0.6.CR1
>
>
> SourceForge Submitter: hanming .
> A little while back, I reported this bug:
> https://sourceforge.net/tracker/?func=detail&atid=376685&aid=715680&group_id=22866
> It brought jboss-service_3_2.dtd closer to what David
> Jencks has in mind:
> "we do not have a dtd for *-service files because
> attributes can have xml
> element values. AFAIK the only way to cater to this
> is with namespaces and
> xml schema. We may need to do this for jboss 4.
> basically...
> <depends optional-attribute-name="foo">[object name or
> another mbean
> dd]</depends>
> and
> <depends-list optional-attribute-name="bar">
> <depends-list-element>[o-n or mbean
> dd]</depends-list-element>
> <depends-list-element>[o-n or mbean
> dd]</depends-list-element>
> ...
> </depends-list>"
> jboss-service_3_2.dtd is as good a DTD as in reflecting
> what David has in mind but it has a major problem: it
> can never be used to validate any *-service.xml file.
> This is because XML 1.0 can never have this kind of
> construct (represented here as using DTD language, as
> opposed to Schema because it cannot be represented
> using the latter):
> <!ELEMENT depends (#PCDATA | mbean)>
> The closest that one can come up with is
> <!ELEMENT depends (#PCDATA | mbean)*>
> This is how XML 1.0 (may XML 1.1 changes it, I don't
> know) deal with a class of SGML problem known as the
> 'pernicious mixed content". Search Google for more details.
> http://www.w3.org/TR/REC-xml#sec-mixed-content
> Summary:
> ---------------
> I know it's too late to change anything for 3.2 but I
> have suggestions for 4.0
> 1. Don't use mixed content, if possible. It's easy to
> get it wrong in different level: API, parsing and
> writing of DTDs/Schemas.
> 2. The easiest local workaround for the element
> <depends> is to use Element wrapper pattern, e.g:
> <!ELEMENT depends-content (#PCDATA)>
> <!ELEMENT depends (depends-content | mbean)>
> But that might not be a good overall solution.
> 3. Bear in mind that XML Schema in designed to work
> with XML 1.0, hence the closest one can use Schema to
> constraint <depends> is:
> <xs:element name="depends">
> <xs:complexType mixed="true">
> <xs:choice>
> <xs:element ref="mbean"/>
> </xs:choice>
> <xs:attribute name="optional-attribute-name"
> type="xs:string"/>
> </xs:complexType>
> </xs:element>
> which is not really what David's original intention is.
> Thank you, Han Ming
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list