Re: [XHTML2] Section 21.1.3 Errata: xml:base Attribute in Example

Lachlan Hunt <lachlan.hunt@iinet.net.au> wrote:

> In the example of the Earth object at the end of section 21.1.3 [1]
> containing the java applet, movie and finally the image, the xml:base
> attribute is not needed on inner most <object> element for the image.
> The xml:base attribute definition [2] states:
> 
>    “The closest parent element that has the xml:base attribute
>     set (i.e., the xml:base attribute is inherited).”
> 
> Therefore, the xml:base should be inherited from the second level
> <object> element.

In this particular case, yes.  The problem is that all examples use
http://www.example.com/ , if the second xml:base used
http://www.example.com/somepath/ or http://www.example.org/ or
something, this example would make more sense.  How about this one?

<!-- First, try the applet -->
<object 
    src="http://www.example.com/applet/TheEarth.class"
    type="application/x-java-applet">

      <!-- Else, try the video -->
      <object 
          src="TheEarth.mpeg"
          type="video/mpeg"
          xml:base="http://www.example.com/video/">

            <!-- Else, try the image -->
            <object
                src="TheEarth.png"
                type="image/png"
                xml:base="http://www.example.com/image/">

                <!-- Else process the alternate text -->
                The <strong>Earth</strong> as seen from space.
            </object>
      </object>
</object>

> [1] http://www.w3.org/TR/xhtml2/mod-object.html#sec_21.1.3.
> [2]
> http://www.w3.org/TR/xhtml2/mod-hyperAttributes.html#adef_hyperAttributes_xml:base

Regards,
-- 
Masayasu Ishikawa / mimasa@w3.org
W3C - World Wide Web Consortium

Received on Monday, 26 July 2004 22:12:55 UTC