Affiliate Webmaster Forum  

Go Back   Affiliate Webmaster Forum > All Aboard > External RSS Feeds


External RSS Feeds Particular RSS feeds that we like including our regular Twitter tweets.

» Sponsors



» Support Our Sponsors!
Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old 11-20-2009, 02:02 PM
GTP Dave's Avatar
Consultations $.05
Administrator
Points: 2,510, Level: 32 Points: 2,510, Level: 32 Points: 2,510, Level: 32
Activity: 99% Activity: 99% Activity: 99%
 
Join Date: May 2008
Location: Switzerland
Posts: 601
Default Default Prefix Declaration

@page { size: A4 portrait; margin: 2cm} @media screen { body {width: 20cm; margin-left: auto; margin-right: auto} } body {font-size: 12pt} pre.code {font-family: monospace} pre {margin-left: 0em} ul.nolabel { margin: 0; margin-left: -2.5em} ul.naked li { list-style-type: none } ol ol {list-style-type: lower-alpha} div.ndli { margin-bottom: 1ex } .math {font-family: 'Arial Unicode MS', 'Lucida Sans Unicode', serif} .sub {font-size: 80%; vertical-align: sub} .termref {text-decoration: none; color: #606000} div.toc h2 {font-size: 120%; margin-top: 0em; margin-bottom: 0em} div.toc h4 {font-size: 100%; margin-top: 0em; margin-bottom: 0em; margin-left: 1em} div.toc h1 {font-size: 140%; margin-bottom: 0em} div.toc ul {margin-top: 1ex} .byline {font-size: 120%} div.figure {margin-left: 2em} div.caption {font-style: italic; font-weight: bold; margin-top: 1em} i i {font-style: normal} Default Prefix Declaration
Default Prefix Declaration

Henry S. Thompson
18 Nov 2009
Table of Contents


1. Disclaimer

The ideas behind the proposal presented here are neither particularly new nor particularly mine. I've made the effort to write this down so anyone wishing to refer to ideas in this space can say "Something along the lines of [this posting]" rather than "Something, you know, like, uhm, what we talked about, prefix binding, media-type-based defaulting, that stuff".


2. Introduction

Criticism of XML namespaces as an appropriate mechanism for enabling distributed extensibility for the Web typically targets two issues:

  1. Syntactic complexity
  2. API complexity
Of these, the first is arguably the more significant, because the number of authors exceeds the number of developers by a large margin. Accordingly, this proposal attempts to address the first problem, by providing a defaulting mechanism for namespace prefix bindings which covers the 99% case.


3. The proposal

Binding Define a trivial XML language which provides a means to associate prefixes with namespace names (URIs); Invoking from HTML Define a link relation dpd for use in the (X)HTML header; Invoking from XML Define a processing instruction xml-dpd and/or an attribute xml:dpd for use at the top of XML documents; Defaulting by Media Type Implement a registry which maps from media types to a published dpd file; Semantics Define a precedence, which operates on a per-prefix basis, namely xmlns: >> explicit invocation >> application built-in default >> media-type-based default, and a semantics in terms of namespace information items or appropriate data-model equivalent on the document element.
4. Why prefixes?

XML namespaces provide two essentially distinct mechanisms for 'owning' names, that is, preventing what would otherwise be a name collision by associating names in some way with some additional distinguishing characteristic:

  1. By prefixing the name, and binding the prefix to a particular URI;
  2. By declaring that within a particular subtree, unprefixed names are associated with a particular URI.
In XML namespaces as they stand today, the association with a URI is done via a namespace declaration which takes the form of an attribute, and whose impact is scoped to the subtree rooted at the owner element of that attribute.

Liam Quin has proposed an additional, out-of-band and defaultable, approach to the association for unprefixed names, using patterns to identify the subtrees where particular URIs apply. I've borrowed some of his ideas about how to connect documents to prefix binding definitions.

The approach presented here is similar-but-different, in that its primary goal is to enable out-of-band and defaultable associations of namespaces to names with prefixes, with whole-document scope. The advantages of focussing on prefixed names in this way are:

  • Ad-hoc extensibility mechanisms typically use prefixes. The HTML5 specification already has at least two of these: aria- and data-;
  • Prefixed names are more robust in the face of arbitrary cut-and-paste operations;
  • Authors are used to them: For example XSLT stylesheets and W3C XML Schema documents almost always use explicit prefixes extensively;
  • Prefix binding information can be very simple: just a set of pairs of prefix and URI.
Provision is also made for optionally specifying a binding for the default namespace at the document element, primarily for the media type registry case, where it makes sense to associate a primary namespace with a media type.


5. Example

If this proposal were adopted, and a dpd document for use in HTML 4.01 or XHTML1:

was registered against the text/html media type, the following would result in a DOM with html and body elements in the XHTML namespace and an input element in the XForms namespace:
... &lt/body> &lt/html>

More...


Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Default Prefix Declaration GTP Dave External RSS Feeds 0 11-18-2009 05:53 PM

» Your Ad Could Be Here

» Look Here!




DomainCompound.com
Domain Compost
Cheapest Web Software
Buy Website Traffic

Webmaster Submit Link

Multiply Profits AND Automate Your Business

AWeber's email marketing software makes it easy.

Opt-In Based Email Marketing

Powered by vBadvanced CMPS v3.2.3

All times are GMT. The time now is 01:38 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0
AffiliateWebmasterForum.com