This is the mail archive of the docbook-apps@lists.oasis-open.org mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: XInclude doesn't validate with xmllint


On Thu, Oct 03, 2002 at 10:27:23AM -0700, Bob Stayton wrote:
> One little item...
> I've noticed in your example and the XInclude Candidate
> Recommendation that the content model for xi:include is:
>  
>   <!ELEMENT xi:include (xi:fallback) >
> 
> Shouldn't there be a question mark to make xi:fallback optional?
> 
>   <!ELEMENT xi:include (xi:fallback?) >
> 
> The spec [1] seems to permit this.  Here is the relevant part:
> 
>   4.4 Fallback Behavior
>   XInclude processors must perform fallback behavior in the
>   event of a resource error, as follows:
>   
>   If the [children] of the xi:include element information item
>   in the source infoset contain exactly one xi:fallback
>   element, the top-level included items consists of the
>   information items corresponding to the result of performing
>   XInclude processing on the [children] of the xi:fallback
>   element. It is a fatal error if there is zero or more than
>   one xi:fallback element.
> 
> When I first read this, the final sentence suggested that
> xi:fallback is required.  But that sentence is qualified
> by the first paragraph, which says fallback is invoked
> only when a resource error occurs (when the xinclude URI can't be
> resolved).
[...]
> [1] XML Inclusions (XInclude) Version 1.0
>     W3C Candidate Recommendation 17 September 2002
>     http://www.w3.org/TR/xinclude/#fallback

  Dohh, okay that's a bug in the XInclude spec IMHO
The (non-normative) DTD example in 3.1 should really read

  <!ELEMENT xi:include (xi:fallback*)>
 
 to match the prose and the <xs:choice minOccurs="0" maxOccurs="unbounded">
present in the Schemas on top of section 3.

Daniel

-- 
Daniel Veillard      | Red Hat Network https://rhn.redhat.com/
veillard@redhat.com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]