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

Re: Fw: Fw: "Clean Specs"

  • From: Tyler Baker <tyler@i...>
  • To: Oren Ben-Kiki <oren@c...>
  • Date: Mon, 08 Feb 1999 16:23:35 -0500

createelement with namespace
Oren Ben-Kiki wrote:

> Tyler Baker <tyler@i...> wrote:
> >or else would I do something like:
> >
> >String namespace = "http://www.w3.org/TR/WD-xsl";
> >String localPart = "text";
> >Document.createElement(namespace + ":" + localPart);
>
> Using '^' instead of ':', that's exactly what I had in mind.

Fair enough (but not compatible with XML 1.0).

> >Of course the forward slash character is not a valid name character so you
> are pretty much
> >screwed as far as this is concerned.
>
> If the only change we'd be requiring in the DOM is allowing '/' in names
> before a '^', then we are in a pretty good shape :-)

This is only one of many characters.  A namespace can be anything you want it to be.  It could
be just about any sequence of unicode characters you can think of.  You would have to restrict
a namespace to be only valid NCName characters.

> >You would need to change the Document interface to have
> >createElement() be of the form:
> >
> >Document.createElement(String prefix, String namespace, String localPart);
>
> I wouldn't mind such a change - or other extensions to the API to _better_
> support namespaces. I'm just not convinced that you couldn't _make due_ with
> the current API in the mean while (barring small relaxation in what is valid
> in a name).

Above example explains the need.

> >The prefix would be there for backwards compatibility.
>
> Just don't delete the 'xmlns' attributes when extending the names. The
> output XML write would be able to use them as a guide to how to generate the
> output XML. Future API calls may use these attributes to provide more
> convenient namespace specific functionality. So?

xmlns: attributes are inherited.  When you copy and clone nodes all over the place (one
application of XSL I know of does this when constructing the source tree programmatically) you
totally lose track of all of this stuff.  Things in effect become unmanageable.

> >> I _really_ wish this whole namespace recommendation was specified this
> way
> >> from the start.
>
> To clarify: If it was specified as being equivalent to a purely textual
> transformation, then only very slight modifications or none at all would
> have been required for current APIs and standards. Yes, XSL would need
> namespace matching patterns. Yes, _in-memory_ names could include anything
> until a '^' character, and only from then would be limited by XML 1.0 rules.
> These seem relatively minor changes. Otherwise, things would just go on
> working.
>
> Why make this more complex then it has to be?

I agree, however the "Namespaces in XML" introduces so many problems that avoiding complexity
at the application level is practically unavoidable as things currently stand.  This is very
unfortunate.

Tyler


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.