Skip to Content.
Sympa Menu

edugain-discuss - Re: [eduGAIN-discuss] namespaces

edugain-discuss AT lists.geant.org

Subject: An open discussion list for topics related to the eduGAIN interfederation service.

List archive

Re: [eduGAIN-discuss] namespaces


Chronological Thread 
  • From: Ian Young <ian AT iay.org.uk>
  • To: Peter Schober <peter.schober AT univie.ac.at>, Janusz Ulanowski <janusz.ulanowski AT HEANET.IE>
  • Cc: edugain-discuss AT lists.geant.org
  • Subject: Re: [eduGAIN-discuss] namespaces
  • Date: Fri, 26 Feb 2016 10:50:01 +0000


> On 26 Feb 2016, at 10:09, Peter Schober <peter.schober AT univie.ac.at> wrote:
>
> Namespaces don't need to be defined in the root element, they can be
> defined on the element using the element or attribute itself, or even
> in appropriate parent elements, IIRC.

Part of the confusion in this area is because the terminology is confusing.
Although we often say that this is a "namespace declaration"...

xmlns:foo="bar"

... in fact what we mean is that it is a declaration of the namespace prefix
foo to refer to the namespace name bar. The namespace name itself is what
counts for XML processors, not the prefix. Indeed, you can declare multiple
prefixes at different levels of the document to represent the *same*
namespace name. Similarly, you can use a namespace name without any prefix at
all:

<element xmlns="bar"/>

None of this should matter for validation or any other processing, just the
<namespace name, local name> assigned to each element and attribute.

> On 26 Feb 2016, at 10:29, Janusz Ulanowski <janusz.ulanowski AT heanet.ie>
> wrote:
>
> What I meant was - if metadata consumed by edugain aggregator contained
> additional namespaces declared in root element.
> I presume the aggregator inserts such declaration into every entity
> containing elements with these namespaces

I've never seen a case where the eduGAIN aggregator does anything other than
the right thing.

You should understand, though, that its job as an aggregator is to associate
the correct namespace *names* (URIs, really) to each element and attribute it
aggregates, and it has wide latitude in how it does that. So it does *not*
have to achieve that end by inserting declarations into every entity, if it
chooses to rely on a prefix declaration at some other level of the hierarchy,
for example at the new document root.

As an example of the sort of thing that's permitted (by the general model of
XML processing): before republication to the UKf, we normalise namespace
declarations in imported eduGAIN metadata by replacing prefixes with the
conventional one we choose, and normally migrating all such declarations up
to the document root.

-- Ian




Attachment: smime.p7s
Description: S/MIME cryptographic signature




Archive powered by MHonArc 2.6.19.

Top of Page