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

attribute name/namespace question

  • To: xml-dev@l...
  • Subject: attribute name/namespace question
  • From: Christof <csad7@t...>
  • Date: Sat, 26 Mar 2005 15:12:48 +0100
  • User-agent: Mozilla Thunderbird 1.0 (Windows/20041206)

attribute name space
hello,
element and attribute names may include a colon character in their name
as far as I understand the XML specification.
therefore something like the following should be possible:

	<x xmlns:prefix="exampleuri"
		 prefix:attname="default-value"
		 prefix:prefix:attname="ref-to-new-value"/>

the attribute with the local-name "prefix:attname" is in the
"exampleuri" namespace which uses "prefix" as its prefix-identifier.
the attribute with the local-name "attname" is also in the "prefix"
namespace.

might look a bit contrived and useless but we are thinking of using such
a thing for a templating system which uses ideas of the kid (python)
templating framework. the above example would use the attribute
"prefix:attname" as a default. the processing would replace this
attribute with the one defined by "prefix:prefix:attname".

the above example is actually parsable with XOM and DOM4J under Java
1.4.2 but does produce erroes on other machines with other JDKs . My
guess is an older XML parser in other JDKs but I wanted to be sure that
my general understanding is right.

thanks a lot
chris

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.