Re: [Xsltforms-support] trouble with XML schema that specializes its own simpleType
Brought to you by:
alain-couthures
From: Dan M. <dan...@gm...> - 2013-07-02 01:55:46
|
Adam, Yes, it makes sense to keep you types as simple as possible. I believe that because XSLTForms needs to run within the browser it only works with simple XML Schema structures. On Mon, Jul 1, 2013 at 4:51 PM, Adam McKee <Ada...@gm...>wrote: > Hi Alain & everyone, > > I've found XSLTForms 576 does not appreciate an XML Schema that > specializes its own SimpleType. > > For example, if my schema defines this simple type: > > <xs:simpleType name="nonEmptyString"> > <xs:restriction base="xs:string"> > <xs:minLength value="1"/> > <xs:pattern value="\S+(.*\S+)?"/> > </xs:restriction> > </xs:simpleType> > > ... and then specializes it to create another simple type: > > <xs:simpleType name="string100"> > <xs:restriction base="myns:nonEmptyString"> > <xs:maxLength value="100"/> > </xs:restriction> > </xs:simpleType> > > ... then XSLTForms will not accept the schema. It complains: > > "Schema for namespace undefined not defined for type nonEmptyString" > > The schema is valid. If I load it into <oXygen/> editor for example, > it correctly understands the "string100" type. > > I can work around this by making the "string100" type a specialization > of "xs:string", and repeating in the "string100" type all the > constraints that are specified for the "nonEmptyString" type. > > What do you make of this? > > Thanks! > > -Adam > > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by Windows: > > Build for Windows Store. > > http://p.sf.net/sfu/windows-dev2dev > _______________________________________________ > Xsltforms-support mailing list > Xsl...@li... > https://lists.sourceforge.net/lists/listinfo/xsltforms-support > -- Dan McCreary http://danmccreary.com Co-author: Making Sense of NoSQL <http://manning.com/mccreary> office: (952) 931-9198 cell: (612) 986-1552 skype: dmccreary47 |