[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

tricky XHTML 1.0 namespace question

  • From: "Simon St.Laurent" <simonstl@s...>
  • To: XML-Dev Mailing list <xml-dev@i...>
  • Date: Mon, 17 Jan 2000 13:05:10 -0500

xhtml href
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

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@i...
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ or CD-ROM/ISBN 981-02-3594-1
Please note: New list subscriptions now closed in preparation for transfer to OASIS.



PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.