This is a static archive of the previous Open Grid Forum GridForge content management system saved from host forge.ogf.org file /sf/sfmain/do/go/artf5014?nav=1&selectedTab=comments at Sun, 06 Nov 2022 16:28:30 GMT SourceForge : artf5014: (1545) Handling of namespaces in extends="" declarations

Project Home

Tracker

Documents

Tasks

Source Code

Discussions

File Releases

Wiki

Project Admin
Search Tracker
Project: CDDLM-WG     Trackers > CDL Spec Revisions > View Artifact
Artifact artf5014 : (1545) Handling of namespaces in extends="" declarations
Tracker: CDL Spec Revisions
Title: (1545) Handling of namespaces in extends="" declarations
Description:
Should this file resolve or not?

<?xml version="1.0"?>
<cdl:cdl xmlns:cdl="http://www.gridforum.org/namespaces/2005/02/cddlm/CDL-1.0"
  xmlns="http://example.org/webapps" >
  <cdl:configuration>
    <server>
      <port>8080</port>
      <security>true</security>
      <webapps/>
    </server>

  </cdl:configuration>
  <cdl:system>

    <tomcat cdl:extends="server">
      <basedir>
      </basedir>
    </tomcat>
  </cdl:system>
</cdl:cdl>

This file fails to resolve extends="server" because the  xmlns="http://example.org/webapps" declaration puts the     
server declaration into that ns. 

My extends lookup logic assumes that any localname without a namespace is in the empty namepace. 

Question is, is that the right assumption?

The other, perfectly valid one, would be to say that any localname in an extends declaration is in the same namespace as
 the element that is being extended. To get something in the empty namespace, I'd have to say extends=":something". 
.
Submitted By: Steve Loughran
Submitted On: 06/15/2005 10:11 AM EST
Last Modified: 03/23/2006 3:08 PM EST

Status / Comments Change Log Associations Attachments  
Status  
Group: * Other
Status:* Open
Category: * Sections 7-10
Customer: *
Priority: * 0
Assigned To: * None
Reported in Release: *
Fixed in Release: *
Estimated Hours: * 0
Actual Hours: * 0
Comments
Guilherme Mauro Germoglio: 03/23/2006 3:08 PM EST
  Comment:
I think this cdl should not resolve. Once the value of the cdl:extends attribute must be a QName, the namespace should be specified through a prefix. 
So, in this case, if tomcat should extend server, which has a default namespace (and no prefix declared), a prefix related to this default namespace 
could be locally declared - in order to the QName be complete. Something like this:

<?xml version="1.0"?>
<cdl:cdl xmlns:cdl="http://www.gridforum.org/namespaces/2005/02/cddlm/CDL-1.0"
xmlns=" http://example.org/webapps" >
<cdl:configuration>
<server>
<port>8080</port>
<security>true</security>
<webapps/>
</server>

</cdl:configuration>
<cdl:system>

<tomcat xmlns:webapps=" http://example.org/webapps" cdl:extends="webapps:server">
<basedir>
</basedir>
</tomcat>
</cdl:system>
</cdl:cdl>
  Action: Update
Steve Loughran: 01/06/2006 7:14 AM EST
  Comment:
see http://www.xml.com/pub/a/2004/02/25/qanda.html for coverage of xpath behaviour here. To be consistent, to find something in a namespace, you need 
to prefix it.
  Action: Update
Steve Loughran: 06/15/2005 10:11 AM EST
  Action: Create


 
 
 
< Previous
 


The Open Grid Forum Contact Webmaster | Report a problem | GridForge Help
This is a static archive of the previous Open Grid Forum GridForge content management system saved from host forge.ogf.org file /sf/sfmain/do/go/artf5014?nav=1&selectedTab=comments at Sun, 06 Nov 2022 16:28:30 GMT