[infinispan-dev] 5.2 XML schema

Tristan Tarrant ttarrant at redhat.com
Thu Aug 23 03:56:56 EDT 2012


Hi all,

as part of my work on ISPN-1978 [1] and ISPN-2210 [2], I have hit a snag 
with the XML schema and the extensibility I want to allow:

- currently elements in the global and cache configuration can be placed 
in any order and can happen at most once (using the <xs:all /> element)
- I want to add an <xs:any namespace="##other /> element to the <xs:all 
/> above, but this is not allowed in XMLSchema 1.0. It is however a 
valid construct in XMLSchema 1.1
- Eclipse (even the latest Juno) does not validate XMLSchema 1.1 files 
and therefore developers using it wouldn't be able to get content assist 
when editing Infinispan configuration files

Possible solutions:
- I go with a 1.1 schema, telling Eclipse users to pressure for an 
updated XML editor
- I stay with a 1.0 schema, but swap <xs:all> with <xs:sequence>, which 
forces the elements to appear in a specific order (minus), but allows 
extension points to be treated as first-class citizens (plus)
- I stay with a 1.0 schema, and place the extension points inside a 
<modules> element which can be a child of <global>, <default> and 
<namedCache>. This allows elements to be in any order, but adds the 
extra indirection.

Fortunately we don't have this issue with the cache stores since that is 
a <xs:sequence>.

Opinions ?

Tristan

[1] https://issues.jboss.org/browse/ISPN-1978
[2] https://issues.jboss.org/browse/ISPN-2210



More information about the infinispan-dev mailing list