From: Jones, A. <And...@li...> - 2008-07-08 12:45:33
|
Hi all, Any XSD experts out there? We need to restrict the value of the attribute "pre" to be a single character from the following alphabet: "ABCDEFGHIJKLMNOPQRSTUVWXYZ-?" Anyone know how to do this in XML Schema? If not, I'll investigate further but it might take a little while for me to get round to it. Cheers Andy > -----Original Message----- > From: David Creasy [mailto:dc...@ma...] > Sent: 03 July 2008 17:40 > To: Jones, Andy > Cc: Angel Pizarro > Subject: pre and post > > Hi Andy, > > We discussed this last week. If you can do it, we can cross another one > off the list... > > http://code.google.com/p/psi-pi/issues/detail?id=34#c2 > > Thanks, > David > -- > David Creasy > Matrix Science > 64 Baker Street > London W1U 7GB, UK > Tel: +44 (0)20 7486 1050 > Fax: +44 (0)20 7224 1344 > > dc...@ma... > http://www.matrixscience.com > > Matrix Science Ltd. is registered in England and Wales > Company number 3533898 |
From: Andreas B. <be...@in...> - 2008-07-08 12:52:27
|
> Any XSD experts out there? We need to restrict the value of the attribute > "pre" to be a single character from the following alphabet: > > "ABCDEFGHIJKLMNOPQRSTUVWXYZ-?" > > Anyone know how to do this in XML Schema? If not, I'll investigate further > but it might take a little while for me to get round to it. s.th. like <xs:restriction base="xs:string"> <xs:pattern value="[A-Z-?]"/> </xs:restriction> with some quoting for '-' and '?' should be sufficient. Best, A. -- Div. for Simulation of Biological Systems, WSI, University of Tuebingen Room C322, Sand 14, 72076 Tuebingen, Germany phone: +49-7071-29-70461 fax: +49-7071-29-5152 http://www-bs.informatik.uni-tuebingen.de |
From: Jones, A. <And...@li...> - 2008-07-09 16:05:27
|
Hi Marc, Thanks for this, I've updated a new schema in the SVN, I also updated the KeyRefs for id rather than identifier (although I only did a global replace on identifier --> id so I didn't check that this works properly) Cheers Andy > -----Original Message----- > From: Marc Sturm [mailto:st...@in...] > Sent: 08 July 2008 13:53 > To: Jones, Andy > Subject: Re: [Psidev-pi-dev] FW: pre and post > > Hi Andy, > > this should do: > > <?xml version="1.0" encoding="UTF-8"?> > <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" > elementFormDefault="qualified" attributeFormDefault="unqualified"> > <xs:element name="Dummy"> > <xs:complexType> > <xs:attribute name="pre" use="required"> > <xs:simpleType> > <xs:restriction base="xs:string"> > <xs:pattern > value="[ABCDEFGHIJKLMNOPQRSTUVWXYZ?-]{1}"/> > </xs:restriction> > </xs:simpleType> > </xs:attribute> > </xs:complexType> > </xs:element> > </xs:schema> > > Best, > Marc |
From: David C. <dc...@ma...> - 2008-07-09 17:11:19
|
Hi Andy, Thanks - I've tested it and it all seems to work fine. David Jones, Andy wrote: > Hi Marc, > > Thanks for this, I've updated a new schema in the SVN, > > I also updated the KeyRefs for id rather than identifier (although I only did a global replace on identifier --> id so I didn't check that this works properly) > > Cheers > Andy > >> -----Original Message----- >> From: Marc Sturm [mailto:st...@in...] >> Sent: 08 July 2008 13:53 >> To: Jones, Andy >> Subject: Re: [Psidev-pi-dev] FW: pre and post >> >> Hi Andy, >> >> this should do: >> >> <?xml version="1.0" encoding="UTF-8"?> >> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" >> elementFormDefault="qualified" attributeFormDefault="unqualified"> >> <xs:element name="Dummy"> >> <xs:complexType> >> <xs:attribute name="pre" use="required"> >> <xs:simpleType> >> <xs:restriction base="xs:string"> >> <xs:pattern >> value="[ABCDEFGHIJKLMNOPQRSTUVWXYZ?-]{1}"/> >> </xs:restriction> >> </xs:simpleType> >> </xs:attribute> >> </xs:complexType> >> </xs:element> >> </xs:schema> >> >> Best, >> Marc > > ------------------------------------------------------------------------- > Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! > Studies have shown that voting for your favorite open source project, > along with a healthy diet, reduces your potential for chronic lameness > and boredom. Vote Now at http://www.sourceforge.net/community/cca08 > _______________________________________________ > Psidev-pi-dev mailing list > Psi...@li... > https://lists.sourceforge.net/lists/listinfo/psidev-pi-dev -- David Creasy Matrix Science 64 Baker Street London W1U 7GB, UK Tel: +44 (0)20 7486 1050 Fax: +44 (0)20 7224 1344 dc...@ma... http://www.matrixscience.com Matrix Science Ltd. is registered in England and Wales Company number 3533898 |