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

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   RE: [xml-dev] When to design an attribute in a namespace?

[ Lists Home | Date Index | Thread Index ]

Title: RE: [xml-dev] When to design an attribute in a namespace?

> From: kynn@panix.com
> But I am interested in learning to recognize those rare situations
> in which, as a designer, one *should* put a particular attribute
> in a namespace.  This is still very unclear to me.  What are the
> requirements that an attribute must fulfill to be a good candidate
> for being placed in a namespace by the schema/DTD designer?

I'm not sure if this example is relevant, but it certainly has attributes in different namespaces.

Zope (http://zope.org/) uses the Template Attribute Language (TAL) in its page templates. Using TAL, Zope can transform a page template to the final XHTML.

For instance (I'm stretching things slightly here, and comments about suss XHTML will be ignored :-):

<html>
  <body>
    <p tal:repeat="row here/listWorkItems">
      Item ID: <span tal:replace="row/item_id"/>
      <br/>
      Task ID: <div tal:content="row/task_id">Content goes here</div>
    </p>
  </body>
</html>

The tal:repeat attribute specifies a loop using "row" as the loop variable and "here/listWorkItems" as the list to iterate over.

The tal:replace attribute causes the entire <span> element to be replaced with the specified item id.

The tal:content attribute causes "Content goes here" to be replaced with the specified task id, while leaving the <div> in place.

Just specifying "repeat", "replace", etc won't work, because these aren't acceptable XHTML attributes. Using attributes from a different namespace seems to fit the bill nicely.

PJDM
--
Peter Mayne
Technology Consultant
Spherion Technology Solutions
Level 1, 243 Northbourne Avenue, Lyneham, ACT, 2602
T: 61 2 62689727  F: 61 2 62689777

 The information contained in this email and any attachments to it:

(a) may be confidential and if you are not the intended recipient, any interference with,
use, disclosure or copying of this material is unauthorised and prohibited; and

(b) may contain personal information of the recipient and/or the sender as defined
under the Privacy Act 1988 (Cth). Consent is hereby given by the recipient(s) to
collect, hold and use such information and any personal information contained in a
response to this email, for any reasonable purpose in the ordinary course of
Spherion's
business, including forwarding this email internally or disclosing it to a third party. All
personal information collected by Spherion will be handled in accordance with
Spherion's Privacy Policy. If you have received this email in error, please notify the
sender and delete it.

(c) you agree not to employ or arrange employment for any candidate(s) supplied in
this email and any attachments without first entering into a contractual agreement with
Spherion. You further agree not to divulge any information contained in this document
to any person(s) or entities without the express permission of Spherion.


 





 

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

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