[opencms-dev] open questions about XML content

Andy Kriger akriger at greaterthanone.com
Thu Nov 11 18:23:50 CET 2004


However, it's certainly not the intention of the XML content to have schema
changes many times. Think of the XML content schema as of database schemas:
Once you got them right on you development machine, they should be deployed
to production and not change often.

-----

I agree with that logic in principle. However, envision a client-driven
OpenCMS deployment where they decide they want to new pieces of information
to an existing type of XML content (clients love to change their minds and
aren't very understanding of 'it would be very difficult to accomodate
you'). Unlike a db schema where you can add a pointer to a new table to
handle a change, the content schema is locked into one file (afaik). Since
the controlcode has a reference to the schema, on edit, it should be
possible for the content file to update itself with the missing fields (I've
done this successfully by hand).

I will definitely look into the XmlContent API and see what is possible
there. It also looks like CmsFile can get the byte[] of XML content files
(the controlcode) and you could use DOM to add fields programmatically that
way (though I've only done a simple test of this).

-a




More information about the opencms-dev mailing list