[opencms-dev] Refine content definition schemas

Alexander Kandzior alex at opencms.org
Tue Dec 7 14:18:30 CET 2004


Jorge,
 
As far as I understand, you talk about schema evailution, i.e. what if a
schema changes after contents are already created with that schema. 
 
I agree that the straightforaward approach for this to just read all XML
contents that use the "old" schema, and re.write them somehow to the "new"
schema. This could be some tool in the "Administration" view. I would
welcome having such a tool, but currently we will not be able to work on
this, so this is open for contribution from someone else.
 
FYI: The next alpha version of OpenCms will feature a much extended version
of the XML content editor that is able to deal with "optional" elements in
the schema, with nested content schemas, puls a couple of other nice featurs
like custom validation rules etc. 
 
So you change a schema definition, and if you do it in a way that the
current content stays "compatible" with the new schema, then all your
content will continue to work. This usually means adding new elements with
"minoccurs=0" setting. As already said, the editor will then allow you to
"activate" such an optional element in case the content your are working on
does not have the element set already. This limits the requirement for a
"schema evolution tool" to cases where the schema changes are such that the
old content will not work anymore with the new version of the schema (e.g.
adding new elements with "minoccurs="1").

Best Regards,
Alex.

Alexander Kandzior
Alkacon Software - The OpenCms Experts
http://www.alkacon.com <http://www.alkacon.com/> 



 


  _____  

From: opencms-dev-bounces at opencms.org
[mailto:opencms-dev-bounces at opencms.org] On Behalf Of Jorge González
Sent: Tuesday, December 07, 2004 1:21 PM
To: OpenCms mailing list (E-mail)
Subject: [opencms-dev] Refine content definition schemas


Hi list:
 
This is a possible new feature, for discussion.
 
Well, version 6 most beautifull feature (for me) is the definition of the
content structure, using a 'simple' xsd schema. The rest of the content
management process (content life cycle) is done by the opencms system.
This is wonderfull if you have a very well defined content domain. But, i
fear this is not the standard on our web projects. Example:
 
The content is "Product for sale"
The marketing guys want new data, "rating of the product by the users" to be
introduced.
 
Then, with the actual content definition system and tools, you could modify
the xsd, or introduce another object type, "Rating" with a link to the
"Product for sale". This is a tricky AND slow solution, but could work.
 
The feature is: Provide a flexible way of editing the content schema after
the content definition and publishing. It could be an script that reads all
the content xml files and checks for correctness, GENERATING the empty
fields, possibly assigning a default value, configured by the admin.
 
It could be more simple to have a "check xml" script, that lists all the xml
content that does not validate against its schema (showing a link list so
you can correct all the content from that list).
 
 
What do you think about it ?
 
Jorge.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20041207/1e6f1ea1/attachment.htm>


More information about the opencms-dev mailing list