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

 


Help: OASIS Mailing Lists Help | MarkMail Help

cam message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: RE: [cam] Default Namespaces


David,
	Firstly, it is not a case of inventing namespaces when they do
not exist.  It is more the case of explicitly prefixing them (just in
CAM) when they do exist. You could see it that CAM makes the namespace
definitions required obvious rather than having them derived by scope
which humans are very poor at.

	I do feel that we should adopt the XSLT approach of allowing
non-prefixed items in the file you are checking or changing but have
fully prefixed CAM definitions.

	I would also favour explicit namespace definition section as
well as the use of xmlns.  In this way again the namespace used are made
obvious rather than a long list of xmlns attributes somewhere in the
file.

	Just so you know the issue is a real problem for any code writer
who is using XPATH.  As we are heavily using XPATH we have to live with
its constraints.

	As to preparsing the problem comes when there is a complex xpath
that has element from multiple namespaces, without prefixes there is no
way to get the namespaces recognised?

	BTW.  I feel the namespace issue is one of the factors that
catches most implementors and most processor out most of the time.

Martin Roberts 
xml designer, 
BT Exact
e-mail: martin.me.roberts@bt.com 
tel: +44(0) 1473 609785  clickdial
fax: +44(0) 1473 609834
Intranet Site :http://twiki.btlabs.bt.co.uk/twiki



-----Original Message-----
From: David RR Webber - XML ebusiness [mailto:Gnosis_@compuserve.com] 
Sent: 11 July 2003 05:01
To: Roberts,MME,Martin,XSG3 R
Cc: cam@lists.oasis-open.org
Subject: RE: [cam] Default Namespaces


Martin,

I think this demands a different approach - because we obviously cannot
be adding in namespaces when the content does not have them.

What about adding something to the <properties> section - where you
could either filter a prefix in or out?

Basically the prefix is only there to fool the way the parsing code has
been written - so I HATE to make this the way it works.

Really - long term - that code should be fixed.  But in the shortterm
you could pre-parse each input line before it gets to the XML parser and
massage it.

Nothing is pretty here.   Misuse of namespaces are just killing.

Thoughts?

Thanks, DW. ========================================================
Message text written by INTERNET:martin.me.roberts@bt.com
>
        So if you look at the examples I sent you will see that the CAM
template has the namespace for the bod associated with the prefix bod.
The xml file that conforms to that template does not require a prefix as
CAM will match via the namespace uri not the prefix.

<



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]