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

RE: Namespace Question

  • From: Daniel Austin <daniela@c...>
  • To: "'hb@i...'" <hb@i...>
  • Date: Mon, 29 Mar 1999 11:18:50 -0800

xml namespace question
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@i... [mailto:hb@i...]
> Sent: Monday, March 29, 1999 3:24 AM
> To: xml-dev@i...; hb@i...
> 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@i...
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@i... the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@i... the following
message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@i...)

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/ and on CD-ROM/ISBN 981-02-3594-1
To (un)subscribe, mailto:majordomo@i... the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@i... the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@i...)


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.