You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by "Pawel Kwasow (JIRA)" <xe...@xml.apache.org> on 2005/07/13 11:18:14 UTC

[jira] Created: (XERCESC-1458) error in SchemaValidator::normalizeWhiteSpace function

error in SchemaValidator::normalizeWhiteSpace function
------------------------------------------------------

         Key: XERCESC-1458
         URL: http://issues.apache.org/jira/browse/XERCESC-1458
     Project: Xerces-C++
        Type: Bug
  Components: Validating Parser (Schema) (Xerces 1.5 or up only)  
    Versions: 2.1.0, 2.6.0    
 Environment: any
    Reporter: Pawel Kwasow


Problem was encountered when we tried to validate xml contained node with value: 
'NINGBO ARTS &amp; CRAFTS IMP&amp;EXP CO.LTD'.
It was incorrectly resolved as 'NINGBO ARTS & CRAFTS IMP &EXP CO.LTD' instead of 'NINGBO ARTS & CRAFTS IMP&EXP CO.LTD' (there should be NO space beetwen 'IMP' and '&EXP').
Validator reported error, because element maximum length is 35 and 'NINGBO ARTS & CRAFTS IMP &EXP CO.LTD' has length of 36.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org


[jira] Updated: (XERCESC-1458) error in SchemaValidator::normalizeWhiteSpace function

Posted by "Pawel Kwasow (JIRA)" <xe...@xml.apache.org>.
     [ http://issues.apache.org/jira/browse/XERCESC-1458?page=all ]

Pawel Kwasow updated XERCESC-1458:
----------------------------------

    Attachment: patch.zip

Well, I post it also as a patch.

> error in SchemaValidator::normalizeWhiteSpace function
> ------------------------------------------------------
>
>          Key: XERCESC-1458
>          URL: http://issues.apache.org/jira/browse/XERCESC-1458
>      Project: Xerces-C++
>         Type: Bug
>   Components: Validating Parser (Schema) (Xerces 1.5 or up only)
>     Versions: 2.1.0, 2.6.0
>  Environment: any
>     Reporter: Pawel Kwasow
>  Attachments: patch.zip
>
> Problem was encountered when we tried to validate xml contained node with value: 
> 'NINGBO ARTS &amp; CRAFTS IMP&amp;EXP CO.LTD'.
> It was incorrectly resolved as 'NINGBO ARTS & CRAFTS IMP &EXP CO.LTD' instead of 'NINGBO ARTS & CRAFTS IMP&EXP CO.LTD' (there should be NO space beetwen 'IMP' and '&EXP').
> Validator reported error, because element maximum length is 35 and 'NINGBO ARTS & CRAFTS IMP &EXP CO.LTD' has length of 36.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org


[jira] Resolved: (XERCESC-1458) error in SchemaValidator::normalizeWhiteSpace function

Posted by "Alberto Massari (JIRA)" <xe...@xml.apache.org>.
     [ http://issues.apache.org/jira/browse/XERCESC-1458?page=all ]
     
Alberto Massari resolved XERCESC-1458:
--------------------------------------

    Resolution: Duplicate

Duplicate of XERCESC-1239

> error in SchemaValidator::normalizeWhiteSpace function
> ------------------------------------------------------
>
>          Key: XERCESC-1458
>          URL: http://issues.apache.org/jira/browse/XERCESC-1458
>      Project: Xerces-C++
>         Type: Bug
>   Components: Validating Parser (Schema) (Xerces 1.5 or up only)
>     Versions: 2.1.0, 2.6.0
>  Environment: any
>     Reporter: Pawel Kwasow
>  Attachments: patch.zip
>
> Problem was encountered when we tried to validate xml contained node with value: 
> 'NINGBO ARTS &amp; CRAFTS IMP&amp;EXP CO.LTD'.
> It was incorrectly resolved as 'NINGBO ARTS & CRAFTS IMP &EXP CO.LTD' instead of 'NINGBO ARTS & CRAFTS IMP&EXP CO.LTD' (there should be NO space beetwen 'IMP' and '&EXP').
> Validator reported error, because element maximum length is 35 and 'NINGBO ARTS & CRAFTS IMP &EXP CO.LTD' has length of 36.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org


[jira] Closed: (XERCESC-1458) error in SchemaValidator::normalizeWhiteSpace function

Posted by "Alberto Massari (JIRA)" <xe...@xml.apache.org>.
     [ http://issues.apache.org/jira/browse/XERCESC-1458?page=all ]
     
Alberto Massari closed XERCESC-1458:
------------------------------------


> error in SchemaValidator::normalizeWhiteSpace function
> ------------------------------------------------------
>
>          Key: XERCESC-1458
>          URL: http://issues.apache.org/jira/browse/XERCESC-1458
>      Project: Xerces-C++
>         Type: Bug
>   Components: Validating Parser (Schema) (Xerces 1.5 or up only)
>     Versions: 2.1.0, 2.6.0
>  Environment: any
>     Reporter: Pawel Kwasow
>  Attachments: patch.zip
>
> Problem was encountered when we tried to validate xml contained node with value: 
> 'NINGBO ARTS &amp; CRAFTS IMP&amp;EXP CO.LTD'.
> It was incorrectly resolved as 'NINGBO ARTS & CRAFTS IMP &EXP CO.LTD' instead of 'NINGBO ARTS & CRAFTS IMP&EXP CO.LTD' (there should be NO space beetwen 'IMP' and '&EXP').
> Validator reported error, because element maximum length is 35 and 'NINGBO ARTS & CRAFTS IMP &EXP CO.LTD' has length of 36.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org


[jira] Commented: (XERCESC-1458) error in SchemaValidator::normalizeWhiteSpace function

Posted by "Pawel Kwasow (JIRA)" <xe...@xml.apache.org>.
    [ http://issues.apache.org/jira/browse/XERCESC-1458?page=comments#action_12315701 ] 

Pawel Kwasow commented on XERCESC-1458:
---------------------------------------

The probably solution to this problem is to change method SchemaValidator::normalizeWhiteSpace. The variable fTrailing is not 'cleared' when a space char already been appended to the string. And it is appended also in next calls to this method.

In the 'NINGBO ARTS &amp; CRAFTS IMP&amp;EXP CO.LTD' example method is called 3 times: with 'NINGBO ARTS ', '& CRAFTS IMP' and '&EXP CO.LTD'. In second and third call the space is appended to the value while it should be only in the second call.

I changed lines:

"
    if ((wsFacet==DatatypeValidator::COLLAPSE) && fTrailing)
        toFill.append(chSpace);
"

to

"
    if ((wsFacet==DatatypeValidator::COLLAPSE) && fTrailing)
    {
        toFill.append(chSpace);
        fTrailing = false;
    }
"

and the problem vanished.

But I'm not 100% sure that this is exactly what is needed to be done, so I don't post this change as a patch.

> error in SchemaValidator::normalizeWhiteSpace function
> ------------------------------------------------------
>
>          Key: XERCESC-1458
>          URL: http://issues.apache.org/jira/browse/XERCESC-1458
>      Project: Xerces-C++
>         Type: Bug
>   Components: Validating Parser (Schema) (Xerces 1.5 or up only)
>     Versions: 2.1.0, 2.6.0
>  Environment: any
>     Reporter: Pawel Kwasow

>
> Problem was encountered when we tried to validate xml contained node with value: 
> 'NINGBO ARTS &amp; CRAFTS IMP&amp;EXP CO.LTD'.
> It was incorrectly resolved as 'NINGBO ARTS & CRAFTS IMP &EXP CO.LTD' instead of 'NINGBO ARTS & CRAFTS IMP&EXP CO.LTD' (there should be NO space beetwen 'IMP' and '&EXP').
> Validator reported error, because element maximum length is 35 and 'NINGBO ARTS & CRAFTS IMP &EXP CO.LTD' has length of 36.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org