/[volute]/trunk/projects/registry/VOResource/VOResource.tex
ViewVC logotype

Diff of /trunk/projects/registry/VOResource/VOResource.tex

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3298 by msdemlei, Thu Apr 14 13:33:32 2016 UTC revision 3299 by msdemlei, Thu Apr 14 13:45:13 2016 UTC
# Line 93  Line 93 
93  Reference to specific elements and types defined in the VOResource  Reference to specific elements and types defined in the VOResource
94  schema include the namespaces prefix \xmlel{vr} as in  schema include the namespaces prefix \xmlel{vr} as in
95  \xmlel{vr:Resource} (a type defined in the VOResource schema).  \xmlel{vr:Resource} (a type defined in the VOResource schema).
 While in generic XML processing, the concrete prefix used is irrelevant  
 as long as the namespace URI mapped (see sect.~\ref{sect:namespace}) is  
 the one given by this specification, in the Virtual Observatory context  
 generators are strongly encouraged to use the \xmlel{vr} prefix.  This  
 is particularly important when this prefix appears in attribute values  
 (e.g., \xmlel{xsi:type}), as non-schema aware XML processors cannot  
 URI-normalize such occurrences.  
96    
97  \section{Introduction}  \section{Introduction}
98    
# Line 264  Line 257 
257  to the XML Schema document that defines the VOResource schema.  to the XML Schema document that defines the VOResource schema.
258  Applications may assume that the namespace URI is so resolvable.  Applications may assume that the namespace URI is so resolvable.
259    
260    Document authors are strongly encouraged to bind this namespace to the
261    \xmlel{vr:} prefix.  While in generic XML processing, the concrete
262    prefix used is irrelevant as long as the namespace URI mapped is the one
263    given by this specification, in the Virtual Observatory context uniform,
264    per-major-version prefixes are viewed as helping interoperability.  This
265    is particularly true when prefixes appear in attribute values (e.g.,
266    \xmlel{xsi:type}), as non-schema aware XML processors cannot
267    URI-normalize such occurrences.  Also, non-XML-aware software (e.g., SQL
268    databases) will use these prefixes rather than the full namespace URIs.
269    
270  Authors of instance documents that use the VOResource schema may choose  Authors of instance documents that use the VOResource schema may choose
271  to provide a location for VOResource XML Schema document using the  to provide a location for VOResource XML Schema document using the
272  \xmlel{xsi:schemaLocation} attribute; the choice of the location value  \xmlel{xsi:schemaLocation} attribute; the choice of the location value
# Line 273  Line 276 
276  above, unless the application prefers otherwise.  above, unless the application prefers otherwise.
277    
278    
279  \begin{lstlisting}  \begin{verbatim}
280  xsi:schemaLocation="http://www.ivoa.net/xml/VOResource/v1.0  xsi:schemaLocation="http://www.ivoa.net/xml/VOResource/v1.0
281                      http://www.ivoa.net/xml/VOResource/v1.0"                      http://www.ivoa.net/xml/VOResource/v1.0"
282  \end{lstlisting}  \end{verbatim}
283    
284  % TODO: always require namespace declaration  Because the VOResource XML schema sets \xmlel{elementFormDefault} to
285  Whenever instance validation is needed, use of  unqualified, documents that use the VOResource schema must not bind the
286  the VOResource schema and its legal extensions must be declared using  empty namespace (using \verb|xmlns="..."|), anywhere in the document
287  the standard namespace declaration attribute,  where the VOResource schema is in effect.  (This is a restriction set by
288  \verb|xmlns:prefix| (where \verb|prefix| is an arbitrary  the rules of XML Schema.)  Furthermore, in accordance with the Schema
289  prefix).  The prefix \xmlel{vr} is used by convention as the  rules for unqualified elements, the VOResource namespace prefix must not
290  prefix defined for the VOResource schema; however, instance documents  used to qualify VOResource elements.  In general, namespace prefixes are
291  may use any prefix of the author's choosing.  In this document, the  only used to qualify type names given as values to the \xmlel{xsi:type}
292  \xmlel{vr} prefix is used to label, as shorthand, a type or  attribute (see next section).  Legal extensions of the VOResource schema
293  element name that is defined in the VOResource schema, as in  SHOULD also set \verb|elementFormDefault="unqualified"| for consistancy.
 \xmlel{vr:Resource}.  
   
 Because the VOResource XML schema sets  
 \verb|elementFormDefault="unqualified"|, documents that use the  
 VOResource schema should not use the namespace declaration attribute  
 \xmlel{xmlns} (used to set the default namespace), anywhere in  
 the document where the VOResource schema is in effect.  (This is a  
 restriction set by the rules of XML Schema.)  Furthermore, in  
 accordance with the Schema rules for unqualified elements, the  
 VOResource namespace prefix must not used to qualify VOResource  
 elements.  In general, namespace prefixes are only used to qualify  
 type names given as values to the \xmlel{xsi:type} attribute (see  
 next section).  Legal extensions of the VOResource schema SHOULD also  
 set \verb|elementFormDefault="unqualified"| for consistancy.  
294    
295    
296    
# Line 2792  Line 2781 
2781  VOResource otherwise)  VOResource otherwise)
2782  \item References to the RM terms in the metadata definition dropped  \item References to the RM terms in the metadata definition dropped
2783  (could add support in ivoates/schemadoc if we want them back).  (could add support in ivoates/schemadoc if we want them back).
2784  \item Ported document source to \ivoatex.  \item Strongly advising the use of the vr: prefix, removing some
2785    duplicated advice regarding prefixes
2786  \item Removed example for deriving a SIA capability (this is now  \item Removed example for deriving a SIA capability (this is now
2787  in the document repository)  in the document repository)
2788    \item Ported document source to \ivoatex.
2789  \end{itemize}  \end{itemize}
2790    
2791  \subsection{Changes from v1.02}  \subsection{Changes from v1.02}

Legend:
Removed from v.3298  
changed lines
  Added in v.3299

msdemlei@ari.uni-heidelberg.de
ViewVC Help
Powered by ViewVC 1.1.26