[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Subject: Re: v98b PartyId needs min length of 1
Scott, I agree and would like to see us go further. One of the common problems with XML syntax is the meaning of required and optional with respect to empty elements and attributes. The problem is the #PCDATA (for elements in a DTD), CDATA (for attributes in a DTD) and string (for elements and attributes in an XML Schema) datatypes do not require any content. So, an empty element satisfies a schema that requires that element. This is a major security and interoperability issue that schemas and DTD's alone do not address. For example, applications are often written without a full understanding of this problem. They are liable to fail in weird and mysterious ways when attempting to access and use empty strings from an XML document. I would recommend defining a subtype of string in our schema with the restriction you've outlined below. We should use that new datatype rather than "string" throughout our schema. (Note: We're lucky here because the problem doesn't have as elegant a solution when using a DTD for validation.) To my knowledge, we have defined no meaning for an empty string anywhere in the ebXML TR&P headers. As such, this restriction should not effect the text of our document. thanx, doug --- Scott Hinkelman <srh@us.ibm.com> wrote: > Looks like we need to change the schema for PartyId and add > constraint for > min length of 1, as in: > > <xsd:element name = "PartyId"> > <xsd:complexType> > <xsd:simpleContent> > <xsd:restriction base = "xsd:string"> > <xsd:minLength value = "1"/> > <xsd:attribute name = "type" type = > "xsd:string"/> > </xsd:restriction> > </xsd:simpleContent> > </xsd:complexType> > </xsd:element> > > Thanks, > Scott Hinkelman, Senior Software Engineer > XML Industry Enablement > IBM e-business Standards Strategy > 512-823-8097 (TL 793-8097) (Cell: 512-940-0519) > srh@us.ibm.com, Fax: 512-838-1074 > > > ------------------------------------------------------------------ > To unsubscribe from this elist send a message with the single word > "unsubscribe" in the body to: ebxml-transport-request@lists.ebxml.org __________________________________________________ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/?.refer=text
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Powered by eList eXpress LLC