Hi Maxime, I give a try : with a default value the inherited type can be empty whereas the original attribute type could not. This is a inheritance inconsistency that is reported by the XSD parser. Try to add use="optional" to your * implementationClass7* attribute inside the generic *serviceType* type.
Regards, Sebastien BAHLOUL IAM / Security specialist Ldap Synchronization Connector : http://lsc-project.org Blog : http://sbahloul.wordpress.com/ 2013/7/16 Maxime Pelletier <[email protected]> > ** > > Hi all, > > I'm trying to modify the XSD in order to define an attribute named > "implementationClass" in the "ServiceType" object, and to add a restriction > in children classes (ex: databaseSourceServiceType) in order to set a > default value . > > Here is what it looks like for the moment in lsc-core-2.0.xsd (not > working!): > ================= > <xsd:complexType name="*serviceType*"> > <xsd:sequence> > <xsd:element name="name" type="xsd:ID" /> > <xsd:element name="connection"> > <xsd:complexType> > <!-- <xsd:annotation> <xsd:documentation> Mandatory attribute that > will > reference the corresponding connection </xsd:documentation> > </xsd:annotation> --> > <xsd:attribute name="reference" type="xsd:IDREF" > use="required" /> > </xsd:complexType> > </xsd:element> > <xsd:element name="impCl5" type="implementationClass4"></xsd:element> > </xsd:sequence> > <xsd:attribute name="id" type="xsd:string" use="optional" /> > <xsd:attribute name="*implementationClass7*" > type="xsd:string"></xsd:attribute> > </xsd:complexType> > > <xsd:complexType name="*givenServiceType*"> > <xsd:complexContent> > <xsd:*restriction *base="*serviceType*"> > <xsd:attribute name="*implementationClass7*" type="xsd:string" * > default*="org.lsc.any.class"></xsd:attribute> > </xsd:restriction> > </xsd:complexContent> > </xsd:complexType> > ================= > > I can't figure out how to do this the right way. No matter what I try, I > always get this error message when I add a "restriction" to a child object: > =========== > derivation-ok-restriction.5.3.2 : Erreur dans le type 'givenServiceType'. > Le type de contenu de ce type est vide, mais le type de contenu du type de > base, 'serviceType', n'est pas vide ou ne peut pas être vide. > =========== > > Can anybody tell me what this message means? Or do you have an idea on how > to structure this? > > Thanks in advance. > > Maxime > > > _______________________________________________________________ > Ldap Synchronization Connector (LSC) - http://lsc-project.org > > lsc-dev mailing list > [email protected] > http://lists.lsc-project.org/listinfo/lsc-dev > >
_______________________________________________________________ Ldap Synchronization Connector (LSC) - http://lsc-project.org lsc-dev mailing list [email protected] http://lists.lsc-project.org/listinfo/lsc-dev

