Subject: Issue 75 - namespace prefix in source versus in other schema

From: "Sharon Chisholm" <[email-masked]>
Date: Fri, 3 Aug 2007 08:01:55 -0400

Hi

I'm make decent progress on the update, but there are a few issues that
remain unresolved. Here is one where I think what is in the current
version needs no modification. Two points here. First off, I think
readability is served by meaningful names, not short cryptic ones.
Second, I think the design pattern we are using is fine.

<andy>
4. (and 3.4).<schema>:

This XSD assigns the default namespace to the target namespace:

     xmlns="urn:ietf:params:netconf:capability:notification:1.0"

However, the XSD in 3.4 does not use a default namespace at all:

    xmlns:manageEvent="urn:ietf:params:xml:ns:netmod:notification"

It uses the prefix 'manageEvent' instead.

IMO, the XSD in sec. 3.4 should be changed to match sec 4.
XSD is hard enough to read as it is without electing to make it even
more verbose.  It is also customary to use short prefixes (like 2 or 3
chars max).
</andy>

Here are the headers from the various places for comparison:

Section 3.4

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns:netconf="urn:ietf:params:xml:ns:netconf:base:1.0"
    xmlns:ncEvent="urn:ietf:params:netconf:capability:notification:1.0"
    xmlns:manageEvent="urn:ietf:params:xml:ns:netmod:notification"
    targetNamespace="urn:ietf:params:xml:ns:netmod:notification"
    elementFormDefault="qualified"
    attributeFormDefault="unqualified"
    xml:lang="en" version="1.0">

Section 4

<?xml version="1.0" encoding="UTF-8"?>
  <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
     xmlns="urn:ietf:params:netconf:capability:notification:1.0"
     xmlns:netconf="urn:ietf:params:xml:ns:netconf:base:1.0"
     targetNamespace=
  "http://www.iana.org/assignments/xml-registry/schema/notification.xsd"
     elementFormDefault="qualified"
     attributeFormDefault="unqualified"
       xml:lang="en">

RFC 4741

  <?xml version="1.0" encoding="UTF-8"?>
   <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
              xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"
              targetNamespace="urn:ietf:params:xml:ns:netconf:base:1.0"
              elementFormDefault="qualified"
              attributeFormDefault="unqualified"
              xml:lang="en">

http://www.w3.org/2001/XMLSchema.xsd

<xs:schema targetNamespace="http://www.w3.org/2001/XMLSchema"
blockDefault="#all" elementFormDefault="qualified" version="1.0"
xml:lang="EN">

Sharon Chisholm
Nortel 
Ottawa, Ontario
Canada

--
to unsubscribe send a message to [email-masked] with
the word 'unsubscribe' in a single line as the message text body.
archive: <http://ops.ietf.org/lists/netconf/>

---

From: Andy Bierman <[email-masked]>
Date: Fri, 03 Aug 2007 06:33:01 -0700

> Second, I think the design pattern we are using is fine.

If you think making XML as verbose as possible serves readability,
then we disagree and what readability means.  Since very few people
actually attempt to read the XSD anyway, maybe it doesn't matter.

The URI string used for the NAMESPACE IDENTIFIER is not
the same format as the URI string used for the CAPABILITY IDENTIFIER.
These are 2 different URI formats, as identified in RFC 4741.

Andy