- From: Simon St.Laurent <simonstl@simonstl.com>
- Date: Mon, 17 Jan 2000 13:04:51 -0500 (EST)
- To: XML-Dev Mailing list <xml-dev@ic.ac.uk>
- Cc: www-html@w3.org
The XHTML 1.0 PR shows (in 3.12) an example of XHTML being included in another XML document type: (I've changed all the angle brackets so this doesn't get et by the mail programs) [?xml version="1.0" encoding="UTF-8"?] [!-- initially, the default namespace is "books" --] [book xmlns='urn:loc.gov:books' xmlns:isbn='urn:ISBN:0-395-36341-6' xml:lang="en" lang="en"] [title]Cheaper by the Dozen[/title] [isbn:number]1568491379[/isbn:number] [notes] [!-- make HTML the default namespace for a hypertext commentary --] [p xmlns='http://www.w3.org/1999/xhtml'] This is also available [a href="http://www.w3.org/"]online[/a]. [/p] [/notes] [/book] This uses the default namespace for its work. Would it be possible (I think it should be) to use a prefix? [?xml version="1.0" encoding="UTF-8"?] [!-- initially, the default namespace is "books" --] [book xmlns='urn:loc.gov:books' xmlns:isbn='urn:ISBN:0-395-36341-6' xml:lang="en" lang="en"] [title]Cheaper by the Dozen[/title] [isbn:number]1568491379[/isbn:number] [notes] [!-- make HTML the default namespace for a hypertext commentary --] [xhtml:p xmlns:xhtml='http://www.w3.org/1999/xhtml'] This is also available [xhtml:a xhtml:href="http://www.w3.org/"]online[/xhtml:a]. [/xhtml:p] [/notes] [/book] If so, is: This is also available [xhtml:a xhtml:href="http://www.w3.org/"]online[/xhtml:a]. equivalent to: This is also available [xhtml:a href="http://www.w3.org/"]online[/xhtml:a]. While XHTML seems to assume that attributes with no prefix fall into the namespace of their containing element throughout, I can't find this stated explicitly. (Perhaps they weren't aware that this has been a contentious issue?) Simon St.Laurent XML Elements of Style / XML: A Primer, 2nd Ed. Building XML Applications Inside XML DTDs: Scientific and Technical Cookies / Sharing Bandwidth http://www.simonstl.com
Received on Monday, 17 January 2000 13:13:48 UTC