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 "Michael Glavassevich (JIRA)" <xe...@xml.apache.org> on 2005/07/24 18:52:53 UTC

[jira] Assigned: (XERCESJ-1090) comments not ignored in schema validation

     [ http://issues.apache.org/jira/browse/XERCESJ-1090?page=all ]

Michael Glavassevich reassigned XERCESJ-1090:
---------------------------------------------

    Assign To: Michael Glavassevich

> comments not ignored in schema validation
> -----------------------------------------
>
>          Key: XERCESJ-1090
>          URL: http://issues.apache.org/jira/browse/XERCESJ-1090
>      Project: Xerces2-J
>         Type: Bug
>   Components: XML Schema Structures
>     Versions: 2.7.0
>  Environment: win2k, jod 1.5.0_01-b08
>     Reporter: Paul V. Biron
>     Assignee: Michael Glavassevich
>     Priority: Minor

>
> Section 3.1.4 of Structures says:
>          [Definition:]  ... the initial value of an element information item is the string composed
>          of, in order, the [character code] of each character information item in the [children] of
>          that element information item.
>          The above definition means that comments and processing instructions, even in the
>          midst of text, are ignored for all ·validation· purposes.
> However, xerces 2.7.0 complains about comments within elements with empty content models.
> <!-- empty.xsd -->
> <xs:schema
> 		xmlns:xs='http://www.w3.org/2001/XMLSchema'>
> 	<xs:element name='root'>
> 		<xs:complexType>
> 			<xs:sequence>
> 				<xs:element name='empty' maxOccurs='unbounded'>
> 					<xs:complexType>
> 						<xs:attribute name='attr' type='xs:string'/>
> 					</xs:complexType>
> 				</xs:element>
> 			</xs:sequence>
> 		</xs:complexType>
> 	</xs:element>
> </xs:schema>
> <!-- empty.xml -->
> <root
> 		xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
> 		xsi:noNamespaceSchemaLocation='empty.xsd'>
> 	<empty attr='bar'/>
> 	<empty attr='baz'></empty>
> 	<empty attr='bif'><!-- this should be ignored --></empty>
> </root>
> c:>java sax.Counter -s -v -f empty.xml
> [Error] empty.xml:6:59: cvc-complex-type.2.1: Element 'empty' must have no character or
>    element information item [children], because the type's content type is empty.
> empty.xml: 371 ms (4 elems, 4 attrs, 0 spaces, 7 chars)

-- 
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: j-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-dev-help@xerces.apache.org