Re: [xml] Where can I get the declaration of a non global element in xmlSchema (using libxml2-2.6.22) ?
- From: Kasimier Buchcik <K Buchcik 4commerce de>
- To: GUY Fabrice <fabrice guy gmail com>
- Cc: "xml gnome org" <xml gnome org>
- Subject: Re: [xml] Where can I get the declaration of a non global element in xmlSchema (using libxml2-2.6.22) ?
- Date: Fri, 16 Sep 2005 12:13:03 +0200
On Fri, 2005-09-16 at 09:29 +0200, GUY Fabrice wrote:
Hi,
I use the xmlSchemaBasicItem type as the internal most basic
type
for all the schema structs. It would probably be good if the
accessor
functions would take only this type, to be free to revamp the
somehow oversized public structures in the future.
Other ideas?
No objections, but my knowledge about psvi is very poor. What
documents should I read to get informations about psvi ?
Maybe you could start a new tread with a more appropriate title...
Everything that starts with "PSVI Contributions for" in the
schema spec is related to PSVI.
Let's examine our current needs to expose the properties of
element declarations to produce an example:
In [1] the spec refers to [schema components]. The properties of
the element declaration component are defined in [2].
E.g. there's a property...
{substitution group exclusions}
A subset of {extension, restriction}.
... which we maybe could expose through:
#define XML_SCHEMA_PSVI_OPERATION_SUBSTITUTION 1
#define XML_SCHEMA_PSVI_OPERATION_EXTENSION 2
#define XML_SCHEMA_PSVI_OPERATION_RESTRICTION 4
int xmlSchemaElemDeclGetPSVISubstGroupExclusions(
xmlSchemaBasicItemPtr comp,
int *set);
The function would return -1 if the type of the given
component is not a XML_SCHEMA_TYPE_ELEMENT.
If would return 0 if the operation was successfully
performed.
@set would be the ORed result of
XML_SCHEMA_PSVI_OPERATION_EXTENSION and/or
XML_SCHEMA_PSVI_OPERATION_RESTRICTION.
This result would be obtained by querying the
xmlSchemaElement->flag field for
XML_SCHEMAS_ELEM_FINAL_EXTENSION and
XML_SCHEMAS_ELEM_FINAL_RESTRICTION.
So although we use the latter values in the flags
internally, we should expose them through properly
named values.
But I'm not sure how we should proceed with naming
of functions, global values, enums, etc. here.
Can anybody provide some thoughts on naming here?
[1] http://www.w3.org/TR/xmlschema-1/#sic-schema
[2] http://www.w3.org/TR/xmlschema-1/#Element_Declaration_details
Regards,
Kasimier
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]