OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   RE: Namespace Question

[ Lists Home | Date Index | Thread Index ]
  • From: Daniel Austin <daniela@cnet.com>
  • To: "'hb@ix.heise.de'" <hb@ix.heise.de>
  • Date: Mon, 29 Mar 1999 11:18:50 -0800

Hi,

	Your question and example are seemingly incomplete; what kind of
document is this with which you are
attempting to use XML Namespaces? If it is intended to be an XHTML document,
it needs an XML PI 
like so: <?xml version="1.0" ?>. I'm asking not to be a smartass but because
it is hard to answer your question otherwise.
If your document is intended to be HTML 4.0 as one of your xmlns attribute
values suggests, then using XML Namespaces is totally inappropriate; HTML
4.0 documents are not XML documents, and XML Namespaces cannot be used in
any way. If the example is an xhtml 1.0 document (I'm assuming that it is)
then the answer to your question is this: an element with an appropriate
Namespaces prefix does not need to have the prefix attached to each of its
attributes, because the scope for that element is defined by the element
name prefix. If you use an attribute from a Namespace that differs from the
Namespace of the element on which the attribute appears, then you must
prefix it properly.

Hope this helps,

Regards,

D-

> -----Original Message-----
> From: hb@ix.heise.de [mailto:hb@ix.heise.de]
> Sent: Monday, March 29, 1999 3:24 AM
> To: xml-dev@ic.ac.uk; hb@ix.heise.de
> Subject: Namespace Question
> 
> 
> Hi,
> 
> For a short example regarding namespaces I have used a 
> variant of Tim's
> example in his XML.com article. 
> 
> Is it necessary (as I presume) to assign every single 
> attribute as long
> as it is not from HTML?
> 
> <html xmlns="http://www.w3.org/html4"
>      xmlns:b="http://www.my.server.de/book"
>      xmlns:p="http://www.my.server.de/person">
>  <head><title>My Booklist</title></head>
>  <body>
>   <table>
>     <tr><td>
> <!-- these are the two lines where the attributes in question are: -->
>           <b:title b:read="yup" 
>              class="important">Dream a little dream of 
> me</b:title></td>
>       <td><b:author id="sfreud">
>           <p:title>Dr.</p:title>
>           <b:firstname>Sigmund</b:firstname>
>           <b:surname>Freud</b:surname></b:author></td></tr>
>   </table>
>  </body>
> </html>
> 
> Best regards,
> 
> Henning Behme
> 
> iX - Magazin fuer professionelle Informationstechnik
> Helstorfer Str. 7 * 30625 Hannover * Germany  
> http://www.heise.de/ix/ * +49 511 5352-374 * f: -361
> ------ White, adj. and n. Black  (Ambrose Bierce) ------
> 
> xml-dev: A list for W3C XML Developers. To post, 
mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN
981-02-3594-1
To (un)subscribe, mailto:majordomo@ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following
message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To (un)subscribe, mailto:majordomo@ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)





 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS