RFR (JAXB): 8159240: XSOM parser incorrectly processes type names with whitespaces

Joe Wang huizhe.wang at oracle.com
Mon Aug 29 21:57:52 UTC 2016


Hi Aleksej,

The patch is fine.  As we discussed, it's too bad the case [number]s 
were not universally unique in identifying the types (that makes it hard 
for the code maintenance), otherwise we would have been able to 
consolidate the collapse calls by types. We can live with the code as 
is, but we'll keep this in mind in case we may touch these code again.

Thanks,
Joe

On 8/25/16, 5:33 AM, Aleks Efimov wrote:
> Hello,
> Please, help to review the JDK9 changes in JAXB XSOM parser that 
> solves issue [0] with incorrectly collapsed namespaces within schema 
> types names definitions/usages:
> http://cr.openjdk.java.net/~aefimov/8159240/9/00/
>
> Problem description:
> The XMLSchema defines that whitespaces should be collapsed for type 
> names and different attribute values that can contain type names. 
> Examples are:
>     - 'name' attribute value for 'xsd:simpleType', 'xsd:complexType', 
> 'xsd:attribute'
>     - 'type' attribute value for 'xsd:attribute'
>     - 'base' attribute value for 'xsd:restriction'
> Almost all type values for such attributes are inherited from NCName 
> or QName schema types. Both types are defined with whiteSpace 
> restriction set to "collapse" [1].
>
> The XSOM parser state machine was reversed engineered and all NCName 
> and QName typed values are now collapsed to match the schema definitions.
> New regression test was executed alongside to JTREG and JCK tests - no 
> failures.
>
> With Best Regards,
> Aleksej
>
> [0] https://bugs.openjdk.java.net/browse/JDK-8159240
> [1] https://www.w3.org/2001/XMLSchema.xsd
> [2] XSOM parser page: https://xsom.java.net/
>


More information about the core-libs-dev mailing list