Subject: [netmod] external review of dsdl-map-05

From: Ladislav Lhotka <[email-masked]>
Date: Thu, 15 Apr 2010 14:08:02 +0200

Hi,

Jirka Kosek sent me his comments to the DSDL mapping draft. I also added
my comments in brackets.

Lada

-------- Přeposlaná zpráva --------
Od: Jirka Kosek <[email-masked]>
Komu: Ladislav Lhotka <[email-masked]>
Předmět: Re: prosba o review
Datum: Thu, 15 Apr 2010 11:31:40 +0200

...

Sec. 7.  NETCONF Content Validation:
I don't know exactly what DSRL is supposed to add to a document, but
perhaps it would be better to run the RELAX NG validation after adding
the defaults in order to be able to catch the cases where the default
value that has been added to the document e.g. violates the data type
constraints. 

[ I considered this option previously - it would in effect change all
leafs with default values from optional to mandatory in the RELAX NG
schema. I don't think the (in)validity of default values is a problem,
as long as they are taken from valid YANG modules. ]

Sec 8.4:
The description of namespace handling in RELAX NG is not completely right.
RELAX NG doesn't have the notion of "target namespace". RELAX NG grammar
defines patterns for elements and part of this pattern is element name.
This name may be qualified (in a namespace) and this specified either by
ns attribute

<element name="foo" ns="http://example.com/ns">

or by using QName in a name attribute

<element name="x:foo" xmlns:x="http://example.com/ns">

So namespace declarations like xmlns:x itself doesn't define anything
similar to target namespace. Important is that some declared element
uses this prefix in element name.

[ I will fix the terminology. ]

Section 9.3:
Definition of translation of XPath expression is quite fuzzy. I think
that it has to be specified more exactly as a rewrite rules operating on
XPath expression tokenized to symbols defined in XPath specs
(http://www.w3.org/TR/xpath/) or it might be possible to reach similar
functionality by defining custom context for evaluating expression.
Similar thing has been done for HTML5, see
http://www.whatwg.org/specs/web-apps/current-work/multipage/apis-in-html-documents.html#interactions-with-xpath-and-xslt
http://www.w3.org/Bugs/Public/show_bug.cgi?id=7059

[ I'll try to follow the recommendation in the first part. The links at
the bottom lead to a discussion quite similar to one that our WG had
regarding the default namespace handling in XPath expressions. Such an
approach is not possible for the DSDL mapping though, because XSLT 1.0
processors follow the spec exactly when handling QNames (no prefix = no
namespace). ] 

Appendix A.1:
I suggest not to use !DOCTYPE and expand entity &nmannot-uri; in
listing. !DOCTYPE can be itself misleading.

[ IMO the entity aids readability as it is used in multiple places, and
also helps to fit the schema into the 72-character limit for line
length. ]

If you really want to preserve !DOCTYPE, then use correct one:
<!DOCTYPE rules ...
(note nvdl:rules changed to rules).

[ Good point, I'll change it as suggested. ]

-- 
Ladislav Lhotka, CESNET
PGP Key ID: E74E8C0C