Hi all,
I'd like to change the way the XML version of an XClass looks, because the current version lacks XML design patterns ( http://www.xmlpatterns.com/ ) compliance, is not extensible and not intuitive enough. The changes will preserve backwards compatibility, meaning that old XML classes will still be recognized, but will be replaced with the new XML structure when changed. I think this change is safe, as the only thing the XML version should be used for is serialization/deserialization, so in general no other code or user should use the raw XML.
Here is a proposed structure, illustrated by an example:
<xclass version="1.1" name="XWiki.XWikiPreferences">
<meta>
<customMapping>internal</customMapping>
<defaultViewSheet>XWiki.PreferencesSheet</defaultViewSheet>
<!-- empty fields like customClass, defaultWeb, validationScript, etc. will not be written in the XML, as they only consume space. -->
</meta>
<properties>
<property name="admin_email">
<prettyName>Admin eMail</prettyName>
<customDisplay></customDisplay>
<validationRegExp></validationRegExp>
<unmodifiable>0</unmodifiable>
<size>30</size>
<name>admin_email</name>
<number>14</number>
<classType>com.xpn.xwiki.objects.classes.StringClass
</classType>
</property>
</properties>
</xclass>
WDYT?
Sergiu
--
http://purl.org/net/sergiu