Oh boy. Sorry about the duplicate!
Is there a date already when Xerces 3 will be released (or a version
that contains all the fixes; patching 2.7.0 with bits and pieces of 3.0
makes me feel a bit uncomfortable...)?
Cheers,
Uwe
Alberto Massari amassari-at-datadirect.com |xerces-c-users mailing list|
schrieb:
Thanks.
However, Boris and David are right; this is bug 1546 that has been
fixed a year ago. This is the patch you can apply to your copy of Xerces:
Index:
C:/Xerces/Xerces-C-2.7/src/xercesc/validators/datatype/ListDatatypeValidator.cpp
===================================================================
---
C:/Xerces/Xerces-C-2.7/src/xercesc/validators/datatype/ListDatatypeValidator.cpp
(revision 369441)
+++
C:/Xerces/Xerces-C-2.7/src/xercesc/validators/datatype/ListDatatypeValidator.cpp
(revision 369442)
@@ -432,7 +432,7 @@
}
XMLString::catString(retBufPtr, itemCanRep);
- retBufPtr = retBufPtr + itemLen + 1;
+ retBufPtr = retBufPtr + itemLen;
*(retBufPtr++) = chSpace;
*(retBufPtr) = chNull;
toUse->deallocate(itemCanRep);
Alberto
At 22.57 08/03/2007 +0100, [EMAIL PROTECTED] wrote:
Just did.
Cheers,
Uwe
Alberto Massari amassari-at-datadirect.com |xerces-c-users mailing
list| schrieb:
Hi Uwe,
can you open a bug in Jira?
Thanks,
Alberto
At 13.39 08/03/2007 +0100, [EMAIL PROTECTED] wrote:
Hello everyone,
I've got a problem with default values specified in a schema that
are arrays.
Xerces 2.7.0 fails to load the Schema grammar below at the
'defaultIntArray3Element' element with the message:
"Value '4' with length '1' is not equal to length facet of '3'"
Well, err, the specified default value is "4 3 2", which is an
array of length 3.
So is the bug in my schema or in Xerces C? I also tried to replace
the restriction of the 'length' faced by restricting 'minLength'
and 'maxLength' to 3, with the same result
Cheers,
Uwe
<?xml version="1.0" encoding="utf-8" ?>
<xs:schema
xmlns="http://foo/test34"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://foo/test34"
>
<!--
Test34 tests default value handling
-->
<xs:simpleType name="intArray">
<xs:list itemType="xs:int"/>
</xs:simpleType>
<xs:simpleType name="intArray3">
<xs:restriction base="intArray">
<xs:length value="3"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="Test34">
<xs:sequence>
<xs:element name="defaultIntArray3Element"
type="intArray3" default="4 3 2"/>
</xs:sequence>
<attribute name="defaultIntArray3" type="intArray3"
default="3 2 1"/>
</xs:complexType>
<!-- root element -->
<xs:element name="test34" type="Test34"/>
</xs:schema>