Hi,
Not sure I understand the reply. In my real life experience we
have found too many tools that find items that are namespace specific
with no prefix too difficult to handle.
The issue is that CAM templates must NOT have default
namespaces. The instance documents can. This is the same rule as for
XSLT.
Therefore you will see fro the attached bod example that I have
changed the cam template and left the instance document alone.
I feel that this is very important as without it we would be not
fully namespace savvy.
Martin Roberts
xml designer,
BT Exact
e-mail:
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:]
Sent: 01 July 2003 17:06
To: Roberts,MME,Martin,XSG3 R
Cc:
Subject: re: [cam] Default Namespaces
Martin,
I see the issue with a default namespace. So we're basically saying -
we do not recommend people assigning a
default namespace.
How about using an <as:include> to pull in that line, that way the
actual offending
xmlns="http://somenamespace.org/
declaration can sit outside of the XML instance, and therefore the CAM
processor will not be bothered by it - but it will get generated into
the final output? We could add a mode to the <as:include> to indicate
if it happens pre-parsing or post-parsing.
Thanks, DW. =======================================================
Message text written by INTERNET:
>
Hi,
The CAM spec needs to specify what will happen with default
namespaces.
In one of the samples based on the BOD two occurances of default
namespaces exist:
one for CAM and one within the structure. The problem with this
is that XPATH can not handle default namespaces, ie. A namespace-uri
that has not associated prefix. It can handle no namespace.
This must be explained in the document as processing the
contents is not possible where the xpath expressions do not use any
prefixes if there is a default namespace uri.
Exactly. /ApplicationArea will only match <ApplicationArea> but not
<ApplicationArea xmlns="http://somenamespace.org/
<http://somenamespace.org/> "/>
This means that CAM templates need to be more carefully created.
<
You may leave a Technical Committee at any time by visiting
http://www.oasis-open.org/apps/org/workgroup/cam/members/leave_workgroup
.php