Print

Print


Well, I don't believe prefix assignments can be prescribed in this spec.  A dateTime string is not going to be limited to an XML context. It has to be expressible as a simple string without structure and without reliance on qualifying attributes.

I don't necessarily envision that dateTime expressions will be carried predominantly as XML attributes, though there is no reason why they shouldn't. And in those case where they are, how often will those expressions contain URIs?

Assuming that the XML attribute case is the only problem case, I think it is reasonable to prescribe that URIs be enclosed in quotes, and for the "problem" case, you could either (a) escape or percent encode the quotes, or (b) use the prefix approach that you describe, which will work in this case because it is XML so there is no problem adding an additional attribute. 

--Ray



> -----Original Message-----
> From: Discussion of the Developing Date/Time Standards
> [mailto:[log in to unmask]] On Behalf Of Saašha Metsärantala
> Sent: Friday, July 08, 2011 9:57 AM
> To: [log in to unmask]
> Subject: Re: [DATETIME] URIs
> 
> Hello!
> 
> > quotes cause problems
> That may occur especially if quotes are put inside XML attributes, for
> example. I guess that EDTF dates will often be used as values in XML
> attributes. It can work thanks to entities or the use of single quotes
> or other syntactic subtleties, but it is more difficult to parse and
> rework - for example with regexes in XSLT.
> 
> I have a suggestion!
> 
> As of today's EDTF specification, colons are always followed by a digit
> (except in URIs). In xs:QName colons are NEVER followed by a digit. We
> could use prefixed names (that is a subset of xs:QName) to encode URIs.
> In their syntax described at http://www.w3.org/TR/REC-xml-names/#NT-
> PrefixedName they always contain exactly ONE colon and this colon is
> NEVER followed by a digit.
> 
> > to determine that an expression is a URI
> This would be a "word" enclosed between spaces, tabs or end-of-lines
> (etc.
> as defined according to XML 1.1) and containing (among other characters)
> ONE colon, and this colon would always be immediately followed by a
> non-digit character.
> 
> Within XML, the namespace would be declared more or less globally as a
> namespace node on any appropriate ancestor-or-self element. Likewise,
> namespaces may be declared in turtle when appropriate, etc.
> 
> For example:
> 
> <myElement xmlns:lca="http://id.loc.gov/authorities/"
> edtfDateTime="lca:sh2001008867.rdf" />
> 
> for
> 
> http://id.loc.gov/authorities/sh2001008867.rdf
> 
> In turtle, an example could be:
> 
> @prefix dc: <http://purl.org/dc/elements/1.1/> .
> 
> @prefix edtf: <http://www.loc.gov/standards/datetime/> .
> 
> @prefix foo: <http://www.example.org/> .
> 
> @prefix lca: <http://id.loc.gov/authorities/> .
> 
> foo:baz dc:date "lca:sh2001008867.rdf"^^edtf:temporalExpression .
> 
> or similar, depending on how we decide to fine tune the EDTF
> specification. Details about turtle are available at
> http://www.w3.org/2008/turtle
> 
> Regards!
> 
> Saašha,