You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by "Kun Xu (JIRA)" <xe...@xml.apache.org> on 2010/03/30 16:19:27 UTC
[jira] Created: (XERCESJ-1434) assertion in simplexContent in
complexType with restriction
assertion in simplexContent in complexType with restriction
-----------------------------------------------------------
Key: XERCESJ-1434
URL: https://issues.apache.org/jira/browse/XERCESJ-1434
Project: Xerces2-J
Issue Type: Bug
Components: XML Schema 1.1 Structures
Affects Versions: 2.9.1
Reporter: Kun Xu
Fix For: 2.10.0
Fail to apply base type's assertion.
Example:
<?xml version="1.1"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="root" type="rootType" />
<xs:complexType name="rootType">
<xs:simpleContent>
<xs:restriction base="xs:anyType">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:assertion test="invalid-XPath-expression()"/>
</xs:restriction>
</xs:simpleType>
</xs:restriction>
</xs:simpleContent>
</xs:complexType>
</xs:schema>
<xs:assertion test="invalid-XPath-expression()"/> won't be tested.
Reason:
Missing "inherit assertion" code in
* @version $Id: XSSimpleTypeDecl.java 904730 2010-01-30 06:40:11Z mukulg $
Patch:
add
// inherit assertion. added for XML Schema 1.1
if ((fFacetsDefined & FACET_ASSERT) == 0 && (fBase.fFacetsDefined & FACET_ASSERT) != 0) {
fFacetsDefined |= FACET_ASSERT;
if ((fixedFacet & FACET_ASSERT) != 0)
{
fFixedFacet |= FACET_ASSERT;
}
}
to the end of step 4 in function
void applyFacets(XSFacets facets, int presentFacet, int fixedFacet, short patternType, ValidationContext context)
throws InvalidDatatypeFacetException
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: j-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-dev-help@xerces.apache.org
[jira] Commented: (XERCESJ-1434) assertion in simplexContent in
complexType with restriction
Posted by "Mukul Gandhi (JIRA)" <xe...@xml.apache.org>.
[ https://issues.apache.org/jira/browse/XERCESJ-1434?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12851724#action_12851724 ]
Mukul Gandhi commented on XERCESJ-1434:
---------------------------------------
Thanks for identifying the bug. I've applied the patch with slight changes.
Kindly verify the fix.
Regards,
Mukul
> assertion in simplexContent in complexType with restriction
> -----------------------------------------------------------
>
> Key: XERCESJ-1434
> URL: https://issues.apache.org/jira/browse/XERCESJ-1434
> Project: Xerces2-J
> Issue Type: Bug
> Components: XML Schema 1.1 Structures
> Affects Versions: 2.9.1
> Reporter: Kun Xu
> Assignee: Mukul Gandhi
> Fix For: 2.10.0
>
> Attachments: patch.txt
>
>
> Fail to apply base type's assertion.
> Example:
> <?xml version="1.1"?>
> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
> <xs:element name="root" type="rootType" />
> <xs:complexType name="rootType">
> <xs:simpleContent>
> <xs:restriction base="xs:anyType">
> <xs:simpleType>
> <xs:restriction base="xs:string">
> <xs:assertion test="invalid-XPath-expression()"/>
> </xs:restriction>
> </xs:simpleType>
> </xs:restriction>
> </xs:simpleContent>
> </xs:complexType>
> </xs:schema>
> <xs:assertion test="invalid-XPath-expression()"/> won't be tested.
> Reason:
> Missing "inherit assertion" code in
> * @version $Id: XSSimpleTypeDecl.java 904730 2010-01-30 06:40:11Z mukulg $
> Patch:
> add
> // inherit assertion. added for XML Schema 1.1
> if ((fFacetsDefined & FACET_ASSERT) == 0 && (fBase.fFacetsDefined & FACET_ASSERT) != 0) {
> fFacetsDefined |= FACET_ASSERT;
>
> if ((fixedFacet & FACET_ASSERT) != 0)
> {
> fFixedFacet |= FACET_ASSERT;
> }
> }
>
> to the end of step 4 in function
> void applyFacets(XSFacets facets, int presentFacet, int fixedFacet, short patternType, ValidationContext context)
> throws InvalidDatatypeFacetException
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: j-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-dev-help@xerces.apache.org
[jira] Updated: (XERCESJ-1434) assertion in simplexContent in
complexType with restriction
Posted by "Kun Xu (JIRA)" <xe...@xml.apache.org>.
[ https://issues.apache.org/jira/browse/XERCESJ-1434?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kun Xu updated XERCESJ-1434:
----------------------------
Attachment: patch.txt
> assertion in simplexContent in complexType with restriction
> -----------------------------------------------------------
>
> Key: XERCESJ-1434
> URL: https://issues.apache.org/jira/browse/XERCESJ-1434
> Project: Xerces2-J
> Issue Type: Bug
> Components: XML Schema 1.1 Structures
> Affects Versions: 2.9.1
> Reporter: Kun Xu
> Assignee: Mukul Gandhi
> Fix For: 2.10.0
>
> Attachments: patch.txt
>
>
> Fail to apply base type's assertion.
> Example:
> <?xml version="1.1"?>
> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
> <xs:element name="root" type="rootType" />
> <xs:complexType name="rootType">
> <xs:simpleContent>
> <xs:restriction base="xs:anyType">
> <xs:simpleType>
> <xs:restriction base="xs:string">
> <xs:assertion test="invalid-XPath-expression()"/>
> </xs:restriction>
> </xs:simpleType>
> </xs:restriction>
> </xs:simpleContent>
> </xs:complexType>
> </xs:schema>
> <xs:assertion test="invalid-XPath-expression()"/> won't be tested.
> Reason:
> Missing "inherit assertion" code in
> * @version $Id: XSSimpleTypeDecl.java 904730 2010-01-30 06:40:11Z mukulg $
> Patch:
> add
> // inherit assertion. added for XML Schema 1.1
> if ((fFacetsDefined & FACET_ASSERT) == 0 && (fBase.fFacetsDefined & FACET_ASSERT) != 0) {
> fFacetsDefined |= FACET_ASSERT;
>
> if ((fixedFacet & FACET_ASSERT) != 0)
> {
> fFixedFacet |= FACET_ASSERT;
> }
> }
>
> to the end of step 4 in function
> void applyFacets(XSFacets facets, int presentFacet, int fixedFacet, short patternType, ValidationContext context)
> throws InvalidDatatypeFacetException
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: j-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-dev-help@xerces.apache.org
[jira] Resolved: (XERCESJ-1434) assertion in simplexContent in
complexType with restriction
Posted by "Michael Glavassevich (JIRA)" <xe...@xml.apache.org>.
[ https://issues.apache.org/jira/browse/XERCESJ-1434?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Michael Glavassevich resolved XERCESJ-1434.
-------------------------------------------
Resolution: Fixed
> assertion in simplexContent in complexType with restriction
> -----------------------------------------------------------
>
> Key: XERCESJ-1434
> URL: https://issues.apache.org/jira/browse/XERCESJ-1434
> Project: Xerces2-J
> Issue Type: Bug
> Components: XML Schema 1.1 Structures
> Affects Versions: 2.9.1
> Reporter: Kun Xu
> Assignee: Mukul Gandhi
> Fix For: 2.10.0
>
> Attachments: patch.txt
>
>
> Fail to apply base type's assertion.
> Example:
> <?xml version="1.1"?>
> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
> <xs:element name="root" type="rootType" />
> <xs:complexType name="rootType">
> <xs:simpleContent>
> <xs:restriction base="xs:anyType">
> <xs:simpleType>
> <xs:restriction base="xs:string">
> <xs:assertion test="invalid-XPath-expression()"/>
> </xs:restriction>
> </xs:simpleType>
> </xs:restriction>
> </xs:simpleContent>
> </xs:complexType>
> </xs:schema>
> <xs:assertion test="invalid-XPath-expression()"/> won't be tested.
> Reason:
> Missing "inherit assertion" code in
> * @version $Id: XSSimpleTypeDecl.java 904730 2010-01-30 06:40:11Z mukulg $
> Patch:
> add
> // inherit assertion. added for XML Schema 1.1
> if ((fFacetsDefined & FACET_ASSERT) == 0 && (fBase.fFacetsDefined & FACET_ASSERT) != 0) {
> fFacetsDefined |= FACET_ASSERT;
>
> if ((fixedFacet & FACET_ASSERT) != 0)
> {
> fFixedFacet |= FACET_ASSERT;
> }
> }
>
> to the end of step 4 in function
> void applyFacets(XSFacets facets, int presentFacet, int fixedFacet, short patternType, ValidationContext context)
> throws InvalidDatatypeFacetException
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: j-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-dev-help@xerces.apache.org
[jira] Commented: (XERCESJ-1434) assertion in simplexContent in
complexType with restriction
Posted by "Michael Glavassevich (JIRA)" <xe...@xml.apache.org>.
[ https://issues.apache.org/jira/browse/XERCESJ-1434?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12851564#action_12851564 ]
Michael Glavassevich commented on XERCESJ-1434:
-----------------------------------------------
Hi Kun,
It would be good if you could separate the patch and open another JIRA issue for the problem you've found with "NaN" since it isn't related to the assertion issue being tracked by this report.
> assertion in simplexContent in complexType with restriction
> -----------------------------------------------------------
>
> Key: XERCESJ-1434
> URL: https://issues.apache.org/jira/browse/XERCESJ-1434
> Project: Xerces2-J
> Issue Type: Bug
> Components: XML Schema 1.1 Structures
> Affects Versions: 2.9.1
> Reporter: Kun Xu
> Assignee: Mukul Gandhi
> Fix For: 2.10.0
>
> Attachments: patch.txt
>
>
> Fail to apply base type's assertion.
> Example:
> <?xml version="1.1"?>
> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
> <xs:element name="root" type="rootType" />
> <xs:complexType name="rootType">
> <xs:simpleContent>
> <xs:restriction base="xs:anyType">
> <xs:simpleType>
> <xs:restriction base="xs:string">
> <xs:assertion test="invalid-XPath-expression()"/>
> </xs:restriction>
> </xs:simpleType>
> </xs:restriction>
> </xs:simpleContent>
> </xs:complexType>
> </xs:schema>
> <xs:assertion test="invalid-XPath-expression()"/> won't be tested.
> Reason:
> Missing "inherit assertion" code in
> * @version $Id: XSSimpleTypeDecl.java 904730 2010-01-30 06:40:11Z mukulg $
> Patch:
> add
> // inherit assertion. added for XML Schema 1.1
> if ((fFacetsDefined & FACET_ASSERT) == 0 && (fBase.fFacetsDefined & FACET_ASSERT) != 0) {
> fFacetsDefined |= FACET_ASSERT;
>
> if ((fixedFacet & FACET_ASSERT) != 0)
> {
> fFixedFacet |= FACET_ASSERT;
> }
> }
>
> to the end of step 4 in function
> void applyFacets(XSFacets facets, int presentFacet, int fixedFacet, short patternType, ValidationContext context)
> throws InvalidDatatypeFacetException
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: j-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-dev-help@xerces.apache.org
[jira] Assigned: (XERCESJ-1434) assertion in simplexContent in
complexType with restriction
Posted by "Michael Glavassevich (JIRA)" <xe...@xml.apache.org>.
[ https://issues.apache.org/jira/browse/XERCESJ-1434?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Michael Glavassevich reassigned XERCESJ-1434:
---------------------------------------------
Assignee: Mukul Gandhi
> assertion in simplexContent in complexType with restriction
> -----------------------------------------------------------
>
> Key: XERCESJ-1434
> URL: https://issues.apache.org/jira/browse/XERCESJ-1434
> Project: Xerces2-J
> Issue Type: Bug
> Components: XML Schema 1.1 Structures
> Affects Versions: 2.9.1
> Reporter: Kun Xu
> Assignee: Mukul Gandhi
> Fix For: 2.10.0
>
>
> Fail to apply base type's assertion.
> Example:
> <?xml version="1.1"?>
> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
> <xs:element name="root" type="rootType" />
> <xs:complexType name="rootType">
> <xs:simpleContent>
> <xs:restriction base="xs:anyType">
> <xs:simpleType>
> <xs:restriction base="xs:string">
> <xs:assertion test="invalid-XPath-expression()"/>
> </xs:restriction>
> </xs:simpleType>
> </xs:restriction>
> </xs:simpleContent>
> </xs:complexType>
> </xs:schema>
> <xs:assertion test="invalid-XPath-expression()"/> won't be tested.
> Reason:
> Missing "inherit assertion" code in
> * @version $Id: XSSimpleTypeDecl.java 904730 2010-01-30 06:40:11Z mukulg $
> Patch:
> add
> // inherit assertion. added for XML Schema 1.1
> if ((fFacetsDefined & FACET_ASSERT) == 0 && (fBase.fFacetsDefined & FACET_ASSERT) != 0) {
> fFacetsDefined |= FACET_ASSERT;
>
> if ((fixedFacet & FACET_ASSERT) != 0)
> {
> fFixedFacet |= FACET_ASSERT;
> }
> }
>
> to the end of step 4 in function
> void applyFacets(XSFacets facets, int presentFacet, int fixedFacet, short patternType, ValidationContext context)
> throws InvalidDatatypeFacetException
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: j-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-dev-help@xerces.apache.org
[jira] Updated: (XERCESJ-1434) assertion in simplexContent in
complexType with restriction
Posted by "Kun Xu (JIRA)" <xe...@xml.apache.org>.
[ https://issues.apache.org/jira/browse/XERCESJ-1434?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kun Xu updated XERCESJ-1434:
----------------------------
Attachment: (was: patch.txt)
> assertion in simplexContent in complexType with restriction
> -----------------------------------------------------------
>
> Key: XERCESJ-1434
> URL: https://issues.apache.org/jira/browse/XERCESJ-1434
> Project: Xerces2-J
> Issue Type: Bug
> Components: XML Schema 1.1 Structures
> Affects Versions: 2.9.1
> Reporter: Kun Xu
> Assignee: Mukul Gandhi
> Fix For: 2.10.0
>
> Attachments: patch.txt
>
>
> Fail to apply base type's assertion.
> Example:
> <?xml version="1.1"?>
> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
> <xs:element name="root" type="rootType" />
> <xs:complexType name="rootType">
> <xs:simpleContent>
> <xs:restriction base="xs:anyType">
> <xs:simpleType>
> <xs:restriction base="xs:string">
> <xs:assertion test="invalid-XPath-expression()"/>
> </xs:restriction>
> </xs:simpleType>
> </xs:restriction>
> </xs:simpleContent>
> </xs:complexType>
> </xs:schema>
> <xs:assertion test="invalid-XPath-expression()"/> won't be tested.
> Reason:
> Missing "inherit assertion" code in
> * @version $Id: XSSimpleTypeDecl.java 904730 2010-01-30 06:40:11Z mukulg $
> Patch:
> add
> // inherit assertion. added for XML Schema 1.1
> if ((fFacetsDefined & FACET_ASSERT) == 0 && (fBase.fFacetsDefined & FACET_ASSERT) != 0) {
> fFacetsDefined |= FACET_ASSERT;
>
> if ((fixedFacet & FACET_ASSERT) != 0)
> {
> fFixedFacet |= FACET_ASSERT;
> }
> }
>
> to the end of step 4 in function
> void applyFacets(XSFacets facets, int presentFacet, int fixedFacet, short patternType, ValidationContext context)
> throws InvalidDatatypeFacetException
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: j-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-dev-help@xerces.apache.org
[jira] Commented: (XERCESJ-1434) assertion in simplexContent in
complexType with restriction
Posted by "Kun Xu (JIRA)" <xe...@xml.apache.org>.
[ https://issues.apache.org/jira/browse/XERCESJ-1434?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12851572#action_12851572 ]
Kun Xu commented on XERCESJ-1434:
---------------------------------
Hi Michael,
I updated the patch and will open another issue for "NaN" later. Thanks.
> assertion in simplexContent in complexType with restriction
> -----------------------------------------------------------
>
> Key: XERCESJ-1434
> URL: https://issues.apache.org/jira/browse/XERCESJ-1434
> Project: Xerces2-J
> Issue Type: Bug
> Components: XML Schema 1.1 Structures
> Affects Versions: 2.9.1
> Reporter: Kun Xu
> Assignee: Mukul Gandhi
> Fix For: 2.10.0
>
> Attachments: patch.txt
>
>
> Fail to apply base type's assertion.
> Example:
> <?xml version="1.1"?>
> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
> <xs:element name="root" type="rootType" />
> <xs:complexType name="rootType">
> <xs:simpleContent>
> <xs:restriction base="xs:anyType">
> <xs:simpleType>
> <xs:restriction base="xs:string">
> <xs:assertion test="invalid-XPath-expression()"/>
> </xs:restriction>
> </xs:simpleType>
> </xs:restriction>
> </xs:simpleContent>
> </xs:complexType>
> </xs:schema>
> <xs:assertion test="invalid-XPath-expression()"/> won't be tested.
> Reason:
> Missing "inherit assertion" code in
> * @version $Id: XSSimpleTypeDecl.java 904730 2010-01-30 06:40:11Z mukulg $
> Patch:
> add
> // inherit assertion. added for XML Schema 1.1
> if ((fFacetsDefined & FACET_ASSERT) == 0 && (fBase.fFacetsDefined & FACET_ASSERT) != 0) {
> fFacetsDefined |= FACET_ASSERT;
>
> if ((fixedFacet & FACET_ASSERT) != 0)
> {
> fFixedFacet |= FACET_ASSERT;
> }
> }
>
> to the end of step 4 in function
> void applyFacets(XSFacets facets, int presentFacet, int fixedFacet, short patternType, ValidationContext context)
> throws InvalidDatatypeFacetException
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: j-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-dev-help@xerces.apache.org
[jira] Updated: (XERCESJ-1434) assertion in simplexContent in
complexType with restriction
Posted by "Kun Xu (JIRA)" <xe...@xml.apache.org>.
[ https://issues.apache.org/jira/browse/XERCESJ-1434?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kun Xu updated XERCESJ-1434:
----------------------------
Attachment: patch.txt
Patch for "assertion" and "NaN"
> assertion in simplexContent in complexType with restriction
> -----------------------------------------------------------
>
> Key: XERCESJ-1434
> URL: https://issues.apache.org/jira/browse/XERCESJ-1434
> Project: Xerces2-J
> Issue Type: Bug
> Components: XML Schema 1.1 Structures
> Affects Versions: 2.9.1
> Reporter: Kun Xu
> Assignee: Mukul Gandhi
> Fix For: 2.10.0
>
> Attachments: patch.txt
>
>
> Fail to apply base type's assertion.
> Example:
> <?xml version="1.1"?>
> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
> <xs:element name="root" type="rootType" />
> <xs:complexType name="rootType">
> <xs:simpleContent>
> <xs:restriction base="xs:anyType">
> <xs:simpleType>
> <xs:restriction base="xs:string">
> <xs:assertion test="invalid-XPath-expression()"/>
> </xs:restriction>
> </xs:simpleType>
> </xs:restriction>
> </xs:simpleContent>
> </xs:complexType>
> </xs:schema>
> <xs:assertion test="invalid-XPath-expression()"/> won't be tested.
> Reason:
> Missing "inherit assertion" code in
> * @version $Id: XSSimpleTypeDecl.java 904730 2010-01-30 06:40:11Z mukulg $
> Patch:
> add
> // inherit assertion. added for XML Schema 1.1
> if ((fFacetsDefined & FACET_ASSERT) == 0 && (fBase.fFacetsDefined & FACET_ASSERT) != 0) {
> fFacetsDefined |= FACET_ASSERT;
>
> if ((fixedFacet & FACET_ASSERT) != 0)
> {
> fFixedFacet |= FACET_ASSERT;
> }
> }
>
> to the end of step 4 in function
> void applyFacets(XSFacets facets, int presentFacet, int fixedFacet, short patternType, ValidationContext context)
> throws InvalidDatatypeFacetException
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: j-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-dev-help@xerces.apache.org
[jira] Commented: (XERCESJ-1434) assertion in simplexContent in
complexType with restriction
Posted by "Michael Glavassevich (JIRA)" <xe...@xml.apache.org>.
[ https://issues.apache.org/jira/browse/XERCESJ-1434?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12851510#action_12851510 ]
Michael Glavassevich commented on XERCESJ-1434:
-----------------------------------------------
Hi Kun,
It would be easier to review and apply your changes (especially if the files change in SVN) if you attached this as a patch (i.e. a context diff). In Eclipse you can create this by right clicking on the source tree and selecting "Team -> Create Patch...". Would be great if you could do that and attach the patch file to this JIRA issue.
Thanks.
> assertion in simplexContent in complexType with restriction
> -----------------------------------------------------------
>
> Key: XERCESJ-1434
> URL: https://issues.apache.org/jira/browse/XERCESJ-1434
> Project: Xerces2-J
> Issue Type: Bug
> Components: XML Schema 1.1 Structures
> Affects Versions: 2.9.1
> Reporter: Kun Xu
> Fix For: 2.10.0
>
>
> Fail to apply base type's assertion.
> Example:
> <?xml version="1.1"?>
> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
> <xs:element name="root" type="rootType" />
> <xs:complexType name="rootType">
> <xs:simpleContent>
> <xs:restriction base="xs:anyType">
> <xs:simpleType>
> <xs:restriction base="xs:string">
> <xs:assertion test="invalid-XPath-expression()"/>
> </xs:restriction>
> </xs:simpleType>
> </xs:restriction>
> </xs:simpleContent>
> </xs:complexType>
> </xs:schema>
> <xs:assertion test="invalid-XPath-expression()"/> won't be tested.
> Reason:
> Missing "inherit assertion" code in
> * @version $Id: XSSimpleTypeDecl.java 904730 2010-01-30 06:40:11Z mukulg $
> Patch:
> add
> // inherit assertion. added for XML Schema 1.1
> if ((fFacetsDefined & FACET_ASSERT) == 0 && (fBase.fFacetsDefined & FACET_ASSERT) != 0) {
> fFacetsDefined |= FACET_ASSERT;
>
> if ((fixedFacet & FACET_ASSERT) != 0)
> {
> fFixedFacet |= FACET_ASSERT;
> }
> }
>
> to the end of step 4 in function
> void applyFacets(XSFacets facets, int presentFacet, int fixedFacet, short patternType, ValidationContext context)
> throws InvalidDatatypeFacetException
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: j-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-dev-help@xerces.apache.org
[jira] Commented: (XERCESJ-1434) assertion in simplexContent in
complexType with restriction
Posted by "Kun Xu (JIRA)" <xe...@xml.apache.org>.
[ https://issues.apache.org/jira/browse/XERCESJ-1434?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12851553#action_12851553 ]
Kun Xu commented on XERCESJ-1434:
---------------------------------
Hi Michael,
I have created a patch for this defect, however it also a patch for another feature "doesn't support NaN".
Example:
XSD:
<?xml version="1.0"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.schemaTest.org/schema11"
xmlns:sv="http://www.schemaTest.org/schema11">
<simpleType name="pSpecial">
<restriction base="precisionDecimal">
<enumeration value="INF"/>
<enumeration value="NaN"/>
</restriction>
</simpleType>
<element name="root">
<complexType>
<sequence>
<element name="Special1" type="sv:pSpecial" minOccurs="1" maxOccurs="unbounded"/>
</sequence>
</complexType>
</element>
</schema>
XML:
<?xml version="1.0" encoding="UTF-8"?>
<dv:root xmlns:dv="http://www.schemaTest.org/schema11"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.schemaTest.org/schema11
test_NAN.xsd">
<Special1>NaN</Special1>
<Special1>INF</Special1>
</dv:root>
The XML file will be failed because of the "NaN"
Should I open another issue for "NaN"?
I attach the patch for both "assertion" and "NaN".
Thanks.
> assertion in simplexContent in complexType with restriction
> -----------------------------------------------------------
>
> Key: XERCESJ-1434
> URL: https://issues.apache.org/jira/browse/XERCESJ-1434
> Project: Xerces2-J
> Issue Type: Bug
> Components: XML Schema 1.1 Structures
> Affects Versions: 2.9.1
> Reporter: Kun Xu
> Assignee: Mukul Gandhi
> Fix For: 2.10.0
>
>
> Fail to apply base type's assertion.
> Example:
> <?xml version="1.1"?>
> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
> <xs:element name="root" type="rootType" />
> <xs:complexType name="rootType">
> <xs:simpleContent>
> <xs:restriction base="xs:anyType">
> <xs:simpleType>
> <xs:restriction base="xs:string">
> <xs:assertion test="invalid-XPath-expression()"/>
> </xs:restriction>
> </xs:simpleType>
> </xs:restriction>
> </xs:simpleContent>
> </xs:complexType>
> </xs:schema>
> <xs:assertion test="invalid-XPath-expression()"/> won't be tested.
> Reason:
> Missing "inherit assertion" code in
> * @version $Id: XSSimpleTypeDecl.java 904730 2010-01-30 06:40:11Z mukulg $
> Patch:
> add
> // inherit assertion. added for XML Schema 1.1
> if ((fFacetsDefined & FACET_ASSERT) == 0 && (fBase.fFacetsDefined & FACET_ASSERT) != 0) {
> fFacetsDefined |= FACET_ASSERT;
>
> if ((fixedFacet & FACET_ASSERT) != 0)
> {
> fFixedFacet |= FACET_ASSERT;
> }
> }
>
> to the end of step 4 in function
> void applyFacets(XSFacets facets, int presentFacet, int fixedFacet, short patternType, ValidationContext context)
> throws InvalidDatatypeFacetException
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: j-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-dev-help@xerces.apache.org
[jira] Updated: (XERCESJ-1434) XML Schema 1.1: Assertion in
simpleContent in complexType with restriction
Posted by "Michael Glavassevich (JIRA)" <xe...@xml.apache.org>.
[ https://issues.apache.org/jira/browse/XERCESJ-1434?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Michael Glavassevich updated XERCESJ-1434:
------------------------------------------
Summary: XML Schema 1.1: Assertion in simpleContent in complexType with restriction (was: assertion in simplexContent in complexType with restriction)
> XML Schema 1.1: Assertion in simpleContent in complexType with restriction
> --------------------------------------------------------------------------
>
> Key: XERCESJ-1434
> URL: https://issues.apache.org/jira/browse/XERCESJ-1434
> Project: Xerces2-J
> Issue Type: Bug
> Components: XML Schema 1.1 Structures
> Affects Versions: 2.9.1
> Reporter: Kun Xu
> Assignee: Mukul Gandhi
> Fix For: 2.10.0
>
> Attachments: patch.txt
>
>
> Fail to apply base type's assertion.
> Example:
> <?xml version="1.1"?>
> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
> <xs:element name="root" type="rootType" />
> <xs:complexType name="rootType">
> <xs:simpleContent>
> <xs:restriction base="xs:anyType">
> <xs:simpleType>
> <xs:restriction base="xs:string">
> <xs:assertion test="invalid-XPath-expression()"/>
> </xs:restriction>
> </xs:simpleType>
> </xs:restriction>
> </xs:simpleContent>
> </xs:complexType>
> </xs:schema>
> <xs:assertion test="invalid-XPath-expression()"/> won't be tested.
> Reason:
> Missing "inherit assertion" code in
> * @version $Id: XSSimpleTypeDecl.java 904730 2010-01-30 06:40:11Z mukulg $
> Patch:
> add
> // inherit assertion. added for XML Schema 1.1
> if ((fFacetsDefined & FACET_ASSERT) == 0 && (fBase.fFacetsDefined & FACET_ASSERT) != 0) {
> fFacetsDefined |= FACET_ASSERT;
>
> if ((fixedFacet & FACET_ASSERT) != 0)
> {
> fFixedFacet |= FACET_ASSERT;
> }
> }
>
> to the end of step 4 in function
> void applyFacets(XSFacets facets, int presentFacet, int fixedFacet, short patternType, ValidationContext context)
> throws InvalidDatatypeFacetException
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: j-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-dev-help@xerces.apache.org
[jira] Updated: (XERCESJ-1434) assertion in simplexContent in
complexType with restriction
Posted by "Michael Glavassevich (JIRA)" <xe...@xml.apache.org>.
[ https://issues.apache.org/jira/browse/XERCESJ-1434?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Michael Glavassevich updated XERCESJ-1434:
------------------------------------------
Labels: (was: edit)
> assertion in simplexContent in complexType with restriction
> -----------------------------------------------------------
>
> Key: XERCESJ-1434
> URL: https://issues.apache.org/jira/browse/XERCESJ-1434
> Project: Xerces2-J
> Issue Type: Bug
> Components: XML Schema 1.1 Structures
> Affects Versions: 2.9.1
> Reporter: Kun Xu
> Assignee: Mukul Gandhi
> Fix For: 2.10.0
>
>
> Fail to apply base type's assertion.
> Example:
> <?xml version="1.1"?>
> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
> <xs:element name="root" type="rootType" />
> <xs:complexType name="rootType">
> <xs:simpleContent>
> <xs:restriction base="xs:anyType">
> <xs:simpleType>
> <xs:restriction base="xs:string">
> <xs:assertion test="invalid-XPath-expression()"/>
> </xs:restriction>
> </xs:simpleType>
> </xs:restriction>
> </xs:simpleContent>
> </xs:complexType>
> </xs:schema>
> <xs:assertion test="invalid-XPath-expression()"/> won't be tested.
> Reason:
> Missing "inherit assertion" code in
> * @version $Id: XSSimpleTypeDecl.java 904730 2010-01-30 06:40:11Z mukulg $
> Patch:
> add
> // inherit assertion. added for XML Schema 1.1
> if ((fFacetsDefined & FACET_ASSERT) == 0 && (fBase.fFacetsDefined & FACET_ASSERT) != 0) {
> fFacetsDefined |= FACET_ASSERT;
>
> if ((fixedFacet & FACET_ASSERT) != 0)
> {
> fFixedFacet |= FACET_ASSERT;
> }
> }
>
> to the end of step 4 in function
> void applyFacets(XSFacets facets, int presentFacet, int fixedFacet, short patternType, ValidationContext context)
> throws InvalidDatatypeFacetException
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: j-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-dev-help@xerces.apache.org