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

Re: Next Round

  • From: james anderson <James.Anderson@m...>
  • To: "XML Developers' List" <xml-dev@i...>
  • Date: Thu, 21 Jan 1999 17:41:03 +0100

Re: Next Round
yes, but...


Tyler Baker wrote:
> 
> Don Park wrote:
> 
> First, we will need to define a new type, namely Name.
> 
> public interface Name {
>   String getPrefix(); // inappropriate
>   String getLocalName();
>   String getQualifiedName(); // inappropriate
>   String getNamespace();
>   String getExpandedName();
>   Name clone();
> }

Neither the prefix nor the qualified name have the same permanence as the
local name, the namespace and the expanded name. One could well collect all
prefixes in connection with which as symbol appeared, but the values are of no
use as the bindings have dynamic extent.
the prefix and the qualified name need to be handled separately, through an
interface which combines symbols (here called names) with a dynamic parsing or
serialization  context.

The other additions have to be modified accordingly: as the prefix has no
meaning outside of the parser's dynamic context, those interfaces have no purpose.

I know the spec gives you no binding for a prefix to a uri within the dtd, but
using the prefix is worse setting some binding rules and sticking to them.
Setting binding rules yields the same results as using the perfix in cases
which are unambiguous, offers a consistent interfaces, and - by virtue of the
bindings rules - at least yields defined results in cases where using the
prefix would yields an undefined result due to ambiguity. Three arguments for
the approach and none against.

> 
> Then change the startElement method to:
> 
> ...
> 
this, for example, is defined only at the moment the element is being
processed. outside of the element's scope there is no defined result.
> String getTypeByQualifiedName(String prefix, String localName);
> // prefix + ':' + localName
> String getTypeByQualifiedName(String qualifiedName);
> 

It would be better to use functions like the following (the results of which
are always defined) 

> String getTypeByExpandedName(String namespace, String localName);
> // namespace + ':' + localName
> String getTypeByExpandedName(String expandedName);

The former can be combined with a function to determine the uri bound to a
prefix - if need be. In my experience this latter function is of no use to an
application, as an application operates is better operating in terms of the
universal names only.

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/
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.