
I gave some input for the AutoGOLE and NSI folks to turn their existing topology descriptions into NML. In that process, Jeroen, Henrik and Roman where so kind to provide feedback. Here is my reply to some of Roman's feedback (quoted on-list with his permission):
xmlns:nml="http://schemas.ogf.org/nml/2013/10/base/"
<!-- RL: I would coinsider removing the month part from the namespace string. --> <!-- It doesn't give us anything, just additional field in the string. An example: http://schemas.ogf.org/nml/201010/base/ -->
I have no objection, but this was already decided upon. Let me quote from the meeting notes of OGF 30 in Brussels: https://forge.ogf.org/sf/go/doc16105
Proposed namespace (after GFD-C.084) is http://schemas.ogf.org/nml/2013/10/base/ Jason counter proposal http://schemas.ogf.org/nml/base/2013/10/ (where 2013/10 is year/month of schema publication)
Rough consensus on: - http://schemas.ogf.org/nml/base/2013/10/ (Jason's proposal)
So it seems I was wrong too (I should have used base before the date). Otherwise, I don't think that your argument is strong enough to change it anymore, so let's use "http://schemas.ogf.org/nml/base/2013/10/" (where 2013/10 is year/month of schema publication).
<nml:name xml:lang="en">Northernlight</nml:name>
<!-- RL: Do we want to use namespaces for attributes. I would say "yes" but for very specific cases. --> <!-- For "lang" I would not. -->
xml:lang is a standard construct to signify the language of the element (string) value. See section 2.12 of the XML specification (http://www.w3.org/TR/xml/#sec-lang-tag). "xml:lang" is really fairly common. It's one of the only 4 attributes listed on http://en.wikipedia.org/wiki/XML, and in fact it's so common a fair slew of people use it in HTML, even though it has no effect there (source: https://developers.google.com/webmasters/state-of-the-web/2005/pageheaders). Since it is so common, I see no reason not to use it.
<dtox:managedBy idRef="urn:ogf:network:nordu.net:2011:NORDUnet:org"/>
<!-- RL: no definition of "urn:ogf:network:nordu.net:2011:NORDUnet:org" in this file --> <!-- Of course it could be possible that a xml document is split so definitions can be located somewhere else. -->
This is caused by a typo. The original URN was "urn:ogf:network:nsa:northernlight", but since this doesn't confirm to the urn:ogf:network spec (https://forge.ogf.org/svn/repos/urn-ogf-docs/urn-ogf-network/), I changed it. Unfortunately, I forgot to rename the target identifier. [...]
<!-- RL: I would change the type value into http://schemas.ogf.org/nml/2013/10/relation/isAlias --> <!-- RL: a typo below; should be "http://schemas.ogf.org/nml/2013/10/relation/hasInboundPort -->
Both were typos and will also be fixed. Thanks for your thorough read, Freek.

On 12-07-2012 10:49, Freek Dijkstra wrote:
xmlns:nml="http://schemas.ogf.org/nml/2013/10/base/"
Roman suggested:
An example: http://schemas.ogf.org/nml/201010/base/ -->
Freek replied:
Let me quote from the meeting notes of OGF 30 in Brussels: https://forge.ogf.org/sf/go/doc16105
Proposed namespace (after GFD-C.084) is http://schemas.ogf.org/nml/2013/10/base/ Jason counter proposal http://schemas.ogf.org/nml/base/2013/10/ (where 2013/10 is year/month of schema publication)
Rough consensus on: - http://schemas.ogf.org/nml/base/2013/10/ (Jason's proposal)
I just thoroughly read GFD.084, and it seems the require the following For the base schema: http://schemas.ogf.org/nml/2012/10/nml For subordinate schema: http://schemas.ogf.org/nml/2012/10/ethernet Thus not: http://schemas.ogf.org/nml/2012/10/base Furthermore, GFD.84 defines the schema without appending character, thus as "http://schemas.ogf.org/nml/2012/10/nml". I am under the impression that e.g. the definition of "Node" in that schema would then become "http://schemas.ogf.org/nml/2012/10/nmlNode", hence that it is common to append a namespace with either a "#" or a "/", so it becomes ""http://schemas.ogf.org/nml/2012/10/nml#Node" or "http://schemas.ogf.org/nml/2012/10/nml/Node" respectively. I don't care what the result is, but like to move forward and dont want to change this after OGF last call. I'm going to ask the Area Director for advice, but don't want to wait too long for a reply. So, if someone is knowledgeable about this sort of stuff, please stand up and enlighten us. This issue can be tracked at https://forge.ogf.org/sf/go/artf6570 Thanks, Freek

Hi, If someone knows an expert in XML (and RDF) namespaces at your local institute, I appreciate it if you can get into touch with me. FYI -- I like some confirmation if my ideas how a slash (/) or hash (#) should or should not be appended to a namespace. See https://forge.ogf.org/sf/go/artf6570 for what I understand so far about http://www.w3.org/TR/xml-names/ (XML) and http://www.w3.org/TR/swbp-vocab-pub/ (RDF). My understanding now is that if we want to define the namespace: http://schemas.ogf.org/nml/2012/10/nml With elements such as http://schemas.ogf.org/nml/2012/10/nml#Node Then in RDF, we need to write: @prefix nml: <http://schemas.ogf.org/nml/2012/10/nml#> urn:ogf:network:example.org:2012:mynode a nml:Node And in XML, we need to write: <root xmlns:nml="http://schemas.ogf.org/nml/2012/10/nml"> <nml:Node id="urn:ogf:network:example.org:2012:mynode" /> Thus WITH slash in the RDF namespace shortcut, and WITHOUT slash in the XML namespace shortcut. I'm somewhat confident of the RDF example, but not sure about the XML example -- XML only seems to define the concept of "'Node' at the 'http://schemas.ogf.org/nml/2012/10/nml' namespace" but never the concept of "'http://schemas.ogf.org/nml/2012/10/nml#Node'" and how to add a slash to join the two together. Feedback is HIGHLY appreciated. Thanks, Freek

W dniu 2012-07-18 14:55, Freek Dijkstra pisze:
Hi,
If someone knows an expert in XML (and RDF) namespaces at your local institute, I appreciate it if you can get into touch with me.
FYI --
I like some confirmation if my ideas how a slash (/) or hash (#) should or should not be appended to a namespace. See https://forge.ogf.org/sf/go/artf6570 for what I understand so far about http://www.w3.org/TR/xml-names/ (XML) and http://www.w3.org/TR/swbp-vocab-pub/ (RDF).
My understanding now is that if we want to define the namespace: http://schemas.ogf.org/nml/2012/10/nml With elements such as http://schemas.ogf.org/nml/2012/10/nml#Node
I've checked quickly the W3C recommendation and in my opinion both forms (with and without slash) are acceptable (I can't find info indicating that slash should not be used; also I've looked at few good examples in the Internet having both forms). It's up to us do we use it or not. GFD.84 promotes this: http://schemas.ogf.org/nml/2012/10/nml so I would stick with it. Also I would use slash to represent elements (if needed). We do it this way in perfSONAR. http://schemas.ogf.org/nml/2012/10/nml/Node Roman
Then in RDF, we need to write: @prefix nml:<http://schemas.ogf.org/nml/2012/10/nml#> urn:ogf:network:example.org:2012:mynode a nml:Node
And in XML, we need to write: <root xmlns:nml="http://schemas.ogf.org/nml/2012/10/nml"> <nml:Node id="urn:ogf:network:example.org:2012:mynode" />
Thus WITH slash in the RDF namespace shortcut, and WITHOUT slash in the XML namespace shortcut.
I'm somewhat confident of the RDF example, but not sure about the XML example -- XML only seems to define the concept of "'Node' at the 'http://schemas.ogf.org/nml/2012/10/nml' namespace" but never the concept of "'http://schemas.ogf.org/nml/2012/10/nml#Node'" and how to add a slash to join the two together.
Feedback is HIGHLY appreciated.
Thanks, Freek
_______________________________________________ nml-wg mailing list nml-wg@ogf.org https://www.ogf.org/mailman/listinfo/nml-wg

All, It turns out that namespaces in XML and RDF are used for a different purpose, and in practice may look subtly different (e.g. the NML RDF namespace contains a hash, while the NML XML variant does not). A few high-level questions: 1. How do we want to translate URIs between RDF and XML? By a lookup table or by some general procedure? 2. Do we want to use (roughly) the same URI for the XML and RDF schema? 3. If you answered "yes" to question #2, what should be publish at this URI? Ad 1: The advantage of a lookup table is that it works for all syntaxes (URIs ending in hash, slash or anything else), but implementations need to learn about the URI before they can support future extensions. The advantage of a procedure is that is works for future NML extensions, but requires that all NML extensions must adhere to a particular syntax. Ad 2: Are we going to use "http://schemas.ogf.org/nml/2012/10/base" and "http://schemas.ogf.org/nml/2012/10/base#" or do we prefer to publish the schema at the defined location. In that case, we need distinct URI. E.g. "http://schemas.ogf.org/nml/2012/10/base/xml" and "http://schemas.ogf.org/nml/2012/10/base/rdf#". Ad 3. A usual trick employed by OASIS is to put up a HTML page which points to both the standard, and the schema(s). E.g. "http://docs.oasis-open.org/tamie/xtemp/200909". There is also a (little used?) standard to add computer readable pointers to the schemata in the HMTL document. See http://www.rddl.org/ For those interested why XML and RDF distinction, here is some background. XML uses namespaces to scope things: e.g. "The 'Node' element in context of the 'http://schemas.ogf.org/nml/2012/10/base' namespace". RDF uses namespace to create shortcuts for long URIs: e.g. "http://schemas.ogf.org/nml/2012/10/base#Node can be abbreviated to nml:Node if 'nml:' is a shortcut for 'http://schemas.ogf.org/nml/2012/10/base#'. Here is an example to highlight the difference. In RDF, these two statements are equivalent: @prefix ns: http://example.net/myschema/ . ns:element a rdf:Resource @prefix ns: http://example.net/myschema/elem . ns:ent a rdf:Resource while the following XML statements are different: <ns:element xmlns:ns="http://example.net/myschema/" /> <ns:ent xmlns:ns="http://example.net/myschema/elem" /> Hence, there is no 1-to-1 relation between RDF namespaces and XML namespace, and a generic translation between the two does not exist. Regards, Freek PS: for those who think things can not be this hairy, let me quote one of the replies I got when I asked about this issue on the xml-dev list: -------- Original Message -------- Subject: Re: [xml-dev] Same namespace for XSD and RDF Date: Tue, 24 Jul 2012 22:01:54 -0400 From: Simon St.Laurent <simonstl@simonstl.com> Reply-To: <simonstl@simonstl.com> To: <xml-dev@lists.xml.org>
At 2012-07-20 17:31 +0200, Freek Dijkstra wrote:
Our (standardisation) group has defined a schema, and wants a representation of it in both XML and RDF. For ease of use, we like to use the same namespace identifier, even at the drawback that we can't publish both the XSD and OWL description at that same URL. Both XML and RDF allow a schema name ending in a word (http://example.org/myschema), or add a slash or hash "#" at the end.
In particular, what are the EXACT rules for adding or removing a hash (#) at the end of a namespace?
There are none for the general case. A namespace is a simple URI string that is used in conjunction with an element's name or an attribute's name to distinguish the construct from other constructs with the same name and a different URI string.
Full stop.
Yes, absolutely, with one caveat. Do not pause to think about this for very long, or you will quickly find yourself recreating H.P. Lovecraft's "The Dreams in the Witch House" with minor variations: ----------------------------------- Whether the dreams brought on the fever or the fever brought on the dreams Walter Gilman did not know. Behind everything crouched the brooding, festering horror of the ancient town, and of the mouldy, unhallowed garret gable where he wrote and studied and wrestled with namespaces and media types when he was not tossing on the meagre iron bed. His ears were growing sensitive to a preternatural and intolerable degree... Possibly Gilman ought not to have studied so hard. The proper relations between resources, fragment identifiers, and namespaces are enough to stretch any brain, and when one mixes them with folklore, and tries to trace a strange background of cyberspace reality behind the ghoulish hints of the Gothic tales and the wild whispers of the chimney-corner, one can hardly expect to be wholly free from mental tension. Gilman came from Haverhill, but it was only after he had entered college in Arkham that he began to connect his hypermedia with the fantastic legends of elder magic. ------------------------------------- It's hard to improve upon Lovecraft, but that seems a reasonable update. If you want to find out how it went with mere "non-Euclidean calculus and quantum physics", see: <http://www.dagonbytes.com/thelibrary/lovecraft/dreamswitchhouse.htm> Thanks, Simon St.Laurent http://simonstl.com/ _______________________________________________________________________ XML-DEV is a publicly archived, unmoderated list hosted by OASIS to support XML implementation and development. To minimize spam in the archives, you must subscribe before posting. [Un]Subscribe/change address: http://www.oasis-open.org/mlmanage/ Or unsubscribe: xml-dev-unsubscribe@lists.xml.org subscribe: xml-dev-subscribe@lists.xml.org List archive: http://lists.xml.org/archives/xml-dev/ List Guidelines: http://www.oasis-open.org/maillists/guidelines.php

Hey Freek, My preference is #2. I'm not sure we need to publish anything at those URLs since the namespace URIs are simply meant to be unique identifiers, not real URLs. If we wanted to do something at those URLs, we could have schemas.ogf.org/nml or schemas.ogf.org/nml/2012/10 and simply redirect to a higher level document with links to the RDF/XML schemas. As to the difference between XML and RDF namespaces, it might be possible to define how the namespaces in RDF *should* be used in NML to make it possible to do RDF -> XML translations (since XML -> RDF translation looks to be straight-forward). If folks follow that usage pattern, it'd be possible to translate between them, and if not, then it's their problem to figure out how to do translations. I could however be missing something obvious due, in part, to a young daughter who decided it would be fun to be awake for much of the night. Cheers, Aaron On Jul 26, 2012, at 10:23 AM, Freek Dijkstra wrote:
All,
It turns out that namespaces in XML and RDF are used for a different purpose, and in practice may look subtly different (e.g. the NML RDF namespace contains a hash, while the NML XML variant does not).
A few high-level questions: 1. How do we want to translate URIs between RDF and XML? By a lookup table or by some general procedure? 2. Do we want to use (roughly) the same URI for the XML and RDF schema? 3. If you answered "yes" to question #2, what should be publish at this URI?
Ad 1: The advantage of a lookup table is that it works for all syntaxes (URIs ending in hash, slash or anything else), but implementations need to learn about the URI before they can support future extensions. The advantage of a procedure is that is works for future NML extensions, but requires that all NML extensions must adhere to a particular syntax.
Ad 2: Are we going to use "http://schemas.ogf.org/nml/2012/10/base" and "http://schemas.ogf.org/nml/2012/10/base#" or do we prefer to publish the schema at the defined location. In that case, we need distinct URI. E.g. "http://schemas.ogf.org/nml/2012/10/base/xml" and "http://schemas.ogf.org/nml/2012/10/base/rdf#".
Ad 3. A usual trick employed by OASIS is to put up a HTML page which points to both the standard, and the schema(s). E.g. "http://docs.oasis-open.org/tamie/xtemp/200909". There is also a (little used?) standard to add computer readable pointers to the schemata in the HMTL document. See http://www.rddl.org/
For those interested why XML and RDF distinction, here is some background. XML uses namespaces to scope things: e.g. "The 'Node' element in context of the 'http://schemas.ogf.org/nml/2012/10/base' namespace". RDF uses namespace to create shortcuts for long URIs: e.g. "http://schemas.ogf.org/nml/2012/10/base#Node can be abbreviated to nml:Node if 'nml:' is a shortcut for 'http://schemas.ogf.org/nml/2012/10/base#'.
Here is an example to highlight the difference. In RDF, these two statements are equivalent:
@prefix ns: http://example.net/myschema/ . ns:element a rdf:Resource
@prefix ns: http://example.net/myschema/elem . ns:ent a rdf:Resource
while the following XML statements are different:
<ns:element xmlns:ns="http://example.net/myschema/" />
<ns:ent xmlns:ns="http://example.net/myschema/elem" />
Hence, there is no 1-to-1 relation between RDF namespaces and XML namespace, and a generic translation between the two does not exist.
Regards, Freek
PS: for those who think things can not be this hairy, let me quote one of the replies I got when I asked about this issue on the xml-dev list:
-------- Original Message -------- Subject: Re: [xml-dev] Same namespace for XSD and RDF Date: Tue, 24 Jul 2012 22:01:54 -0400 From: Simon St.Laurent <simonstl@simonstl.com> Reply-To: <simonstl@simonstl.com> To: <xml-dev@lists.xml.org>
At 2012-07-20 17:31 +0200, Freek Dijkstra wrote:
Our (standardisation) group has defined a schema, and wants a representation of it in both XML and RDF. For ease of use, we like to use the same namespace identifier, even at the drawback that we can't publish both the XSD and OWL description at that same URL. Both XML and RDF allow a schema name ending in a word (http://example.org/myschema), or add a slash or hash "#" at the end.
In particular, what are the EXACT rules for adding or removing a hash (#) at the end of a namespace?
There are none for the general case. A namespace is a simple URI string that is used in conjunction with an element's name or an attribute's name to distinguish the construct from other constructs with the same name and a different URI string.
Full stop.
Yes, absolutely, with one caveat. Do not pause to think about this for very long, or you will quickly find yourself recreating H.P. Lovecraft's "The Dreams in the Witch House" with minor variations:
----------------------------------- Whether the dreams brought on the fever or the fever brought on the dreams Walter Gilman did not know. Behind everything crouched the brooding, festering horror of the ancient town, and of the mouldy, unhallowed garret gable where he wrote and studied and wrestled with namespaces and media types when he was not tossing on the meagre iron bed. His ears were growing sensitive to a preternatural and intolerable degree...
Possibly Gilman ought not to have studied so hard. The proper relations between resources, fragment identifiers, and namespaces are enough to stretch any brain, and when one mixes them with folklore, and tries to trace a strange background of cyberspace reality behind the ghoulish hints of the Gothic tales and the wild whispers of the chimney-corner, one can hardly expect to be wholly free from mental tension. Gilman came from Haverhill, but it was only after he had entered college in Arkham that he began to connect his hypermedia with the fantastic legends of elder magic. -------------------------------------
It's hard to improve upon Lovecraft, but that seems a reasonable update.
If you want to find out how it went with mere "non-Euclidean calculus and quantum physics", see:
<http://www.dagonbytes.com/thelibrary/lovecraft/dreamswitchhouse.htm>
Thanks, Simon St.Laurent http://simonstl.com/ _______________________________________________________________________
XML-DEV is a publicly archived, unmoderated list hosted by OASIS to support XML implementation and development. To minimize spam in the archives, you must subscribe before posting.
[Un]Subscribe/change address: http://www.oasis-open.org/mlmanage/ Or unsubscribe: xml-dev-unsubscribe@lists.xml.org subscribe: xml-dev-subscribe@lists.xml.org List archive: http://lists.xml.org/archives/xml-dev/ List Guidelines: http://www.oasis-open.org/maillists/guidelines.php
_______________________________________________ nml-wg mailing list nml-wg@ogf.org https://www.ogf.org/mailman/listinfo/nml-wg
Internet2 Fall Member Meeting Sep 30-Oct 4, 2012 - Philadelphia, PA http://events.internet2.edu/2012/fall-mm/

Hi, On 26 Jul 2012, at 16:23, Freek Dijkstra wrote:
It turns out that namespaces in XML and RDF are used for a different purpose, and in practice may look subtly different (e.g. the NML RDF namespace contains a hash, while the NML XML variant does not).
I dove down the XML & RDF Namespace rabbit hole also unfortunately, and I have to correct the above: - Namespaces in XML are used for scoping, in XML the element name and namespace are separate parts in identifying a single thing. - Namespaces in RDF are used like prefixing, the element name and namespace are concatenated to form a single identifying URI. - It is *best practice* to not end XML namespaces in "/" or "#", but it is perfectly valid to do so, and many standards do. - It is *best practice* to end an RDF namespace in "#", but it is perfectly valid to use something else, some standards also use "/". - The RDF standard states that "rdf:id" values are transformed by appending "#" to the namespace, and then appending the value. In practice "rdf:id" is not used. - The RDF syntax further complicates things by stating informatively that implementations must add a "/" to the end of a namespace if it is a hierarchical namespace. With that in mind, I would propose that we use http://schemas.ogf.org/nml/2012/10/nml/ as the namespace, so that we can use the same for both XML and RDF. Jeroen.

On 31-07-2012 10:34, Jeroen van der Ham wrote:
Hi,
On 26 Jul 2012, at 16:23, Freek Dijkstra wrote:
It turns out that namespaces in XML and RDF are used for a different purpose, and in practice may look subtly different (e.g. the NML RDF namespace contains a hash, while the NML XML variant does not).
I dove down the XML & RDF Namespace rabbit hole also unfortunately, and I have to correct the above:
Please note that I intended the above as just an example. I did not mean to imply that this must be the case. The statements below (at least the first four) are correct.
- Namespaces in XML are used for scoping, in XML the element name and namespace are separate parts in identifying a single thing. - Namespaces in RDF are used like prefixing, the element name and namespace are concatenated to form a single identifying URI. - It is *best practice* to not end XML namespaces in "/" or "#", but it is perfectly valid to do so, and many standards do. - It is *best practice* to end an RDF namespace in "#", but it is perfectly valid to use something else, some standards also use "/". - The RDF standard states that "rdf:id" values are transformed by appending "#" to the namespace, and then appending the value. In practice "rdf:id" is not used. - The RDF syntax further complicates things by stating informatively that implementations must add a "/" to the end of a namespace if it is a hierarchical namespace.
With that in mind, I would propose that we use http://schemas.ogf.org/nml/2012/10/nml/ as the namespace, so that we can use the same for both XML and RDF.
It seems that either "http://schemas.ogf.org/nml/2012/10/nml/" or "http://schemas.ogf.org/nml/2012/10/nml#" will do. Most namespace pick the hash, do you know why? What is a "hierarchical namespace" and how does it differ from a "non-hierarchical namespace"? Freek (PS: I personally still prefer http://schemas.ogf.org/nml/2012/10/nml# over http://schemas.ogf.org/nml/2012/10/nml#, despite GFD.84. Probably because I'm used to it).

On 31 Jul 2012, at 10:48, Freek Dijkstra wrote:
It seems that either "http://schemas.ogf.org/nml/2012/10/nml/" or "http://schemas.ogf.org/nml/2012/10/nml#" will do.
Most namespace pick the hash, do you know why?
No, but I'm guessing it has to do with the "rdf:id" construct, combined with the HTML fragment identifier feeling more natural.
What is a "hierarchical namespace" and how does it differ from a "non-hierarchical namespace"?
I have no idea, I was just reproducing what was in the RDF standard. Frankly, I was surprised it was there.
(PS: I personally still prefer http://schemas.ogf.org/nml/2012/10/nml# over http://schemas.ogf.org/nml/2012/10/nml#, despite GFD.84. Probably because I'm used to it).
Ehm, which one over which? Jeroen.

On 31-07-2012 10:59, Jeroen van der Ham wrote:
(PS: I personally still prefer http://schemas.ogf.org/nml/2012/10/nml# over http://schemas.ogf.org/nml/2012/10/nml#, despite GFD.84. Probably because I'm used to it).
Ehm, which one over which?
Dôh! "http://schemas.ogf.org/nml/2012/10/base#" over "http://schemas.ogf.org/nml/2012/10/nml#". Freek
participants (4)
-
Aaron Brown
-
Freek Dijkstra
-
Jeroen van der Ham
-
Roman Łapacz