Issue 59597 - XML Schema definition against which addons.xcu files can be validated?
Summary: XML Schema definition against which addons.xcu files can be validated?
Status: CLOSED FIXED
Alias: None
Product: App Dev
Classification: Unclassified
Component: api (show other issues)
Version: 3.3.0 or older (OOo)
Hardware: All All
: P3 Trivial
Target Milestone: ---
Assignee: bdonovan
QA Contact: issues@api
URL: http://api.openoffice.org/docs/Develo...
Keywords:
Depends on:
Blocks:
 
Reported: 2005-12-20 16:22 UTC by bdonovan
Modified: 2017-05-20 09:32 UTC (History)
4 users (show)

See Also:
Issue Type: ENHANCEMENT
Latest Confirmation in: 3.4.1
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description bdonovan 2005-12-20 16:22:48 UTC
I've been looking for a schema (XML Schema datatypes are used, so I guess an XML
Schema definition would be most likely) against which I can validate addons.xcu
files.  In section 4.7.3 of the Developer's Guide, there's something that looks
schema-ish, but is not a schema, under the sentence: "The schema of the
configuration branch org.openoffice.Office.Addons specifies how to define a user
interface extension."

I also found some XML Schema defs on the page
<http://util.openoffice.org/common/configuration/oor-document-format.html> but
they relate to OOo's registry which seems unrelated to add-ons.
Comment 1 jsc 2005-12-20 16:36:53 UTC
i am not sure if your search simply the Addon.xcs file which can be found in
your office installation under
<office_root>\share\registry\shema\org\openoffice\Office\Addons.xcs

Comment 2 christianjunker 2005-12-20 21:50:04 UTC
i guess this issue is about the fact that the xml schema is not fully explained in one document.
adding myself to cc.
Comment 3 bdonovan 2005-12-21 01:59:52 UTC
Jsc, thank you for pointing me to the Addons.xcs file.

I am not well-versed in XML Schema, but would like to be able to validate my
addons.xcu files against a schema (RelaxNG, with which I'm better acquainted,
would be fine as well) manually and, possibly, later automate the process so
that I could programmatically generate add-ons with valid xcu files.

There are some differences between the file:

<office_root>\share\registry\shema\org\openoffice\Office\Addons.xcs

and the "schema" given in the Developer's Guide.

At first glance, these differences seem to be mainly/only the presence, in the
document in the registry, of <info> elements with <descr> child elements.  Why
the difference? To make the Dev Guide more readable?

Neither the DevGuide schema nor the one from OOo's registry validate as XML
Schema (I'm checking them with the Eclipse oXygen XML plugin).

For the DevGuide document, the complaints revolve around the root element - not
being <xsd:schema> and the root element that is present,<oor:component-schema>,
being prefixed with a namespace other than the XML Schema namespace and
<oor:component-schema> not being a valid root element period.

For the document preent in OOo's registry, oXygen XML gives me the same
complaints followed by as many errors as there are info/descr element pairs:

"Non-whitespace characters are not allowed in schema elements other than
'xs:appinfo' and 'xs:documentation' [...]"

Are these XML Schema definitions (as in <http://www.w3.org/XML/Schema>) that are
just a little broken or are they non-XML-Schema schemas that happen to use the
XML Schema datatypes?

The tool also shows a lot of (different) errors for the schemas on
<http://util.openoffice.org/common/configuration/oor-document-format.html>,
though they start off with xs:schema.

As I said, I'm not well-acquainted with XML Schema and I am probably relying too
much on a tool to check out these schemas, but, by all accounts, oXygen XML is
widely used and seems to be pretty trustworthy.

Thanks for your help.
Comment 4 jsc 2005-12-21 12:17:22 UTC
the xcs file is more configuration specific and probably not usable for
validation with normal xml tools. But it is an interesting idea to create a real
xml schema for this purpose. I've discussed it with Stephan Bergmann who had the
idea to create a schema for xcs and xcu files so that both kind of files can be
validated with existing xml tools. Specilaized schemas for addons or whatever
are imaginable as well.
Comment 5 bdonovan 2005-12-21 16:24:54 UTC
Having a XML Schema definition for the xcu format would be extremely helpful,
especially, I think, to people like me who are just starting to try their hand
at add-on development.  

The ability to quickly and painlessly (and automatically) validate an xcu file
would help people to catch any obvious/"dumb" mistakes and give them confidence
in moving forward.

Is there any way that we encourage Mr. Bergmann to take a look at this?
Comment 6 jsc 2005-12-21 16:40:24 UTC
of course, he is sitting vis a vis from me ;-) I forward this issue to him and
cc me because i am interested in this issue as well
Comment 7 Stephan Bergmann 2006-01-10 08:47:56 UTC
The OOo CVS contains XML Schema for both .xcs (at
officecfg/registry/component-schema.xsd) and .xcu (at
officecfg/registry/component-update.xsd) files.  I hope that suits your needs
(even though an addon.xcu could be considered a restricted form of a general
.xcu file, so that component-update.xsd could be considered too broad for your
specific needs).  If, however, there are any problems with those .xsd files,
then please open a new issue.
Comment 8 Rob Weir 2013-01-08 20:52:29 UTC
Most recent comment refers to a schema definition in CVS.  But I see no schema at that location in SVN.  So I'm opening this as an enhancement request.
Comment 9 Ariel Constenla-Haile 2013-01-08 23:02:00 UTC
(In reply to comment #8)
> Most recent comment refers to a schema definition in CVS.  But I see no
> schema at that location in SVN.  So I'm opening this as an enhancement
> request.

Comment 7 from Stephan gives you the clue: DTDs are located in

main/officecfg/registry/
Comment 10 Rob Weir 2013-01-08 23:22:10 UTC
Schemas are located here:

https://svn.apache.org/repos/asf/incubator/ooo/trunk/main/officecfg/registry/