7.10. xsd:appinfo
The xsd:appinfo feature is used by schemas to convey processing instructions to a
processing application, stylesheet, or other tool. Some users of UBL believe that this
technique poses a security risk and have employed techniques for stripping xsd:appinfo
from schemas. As UBL is committed to ensuring the widest possible target audience for its
XML library, this feature is used only to convey information.
[GXS12] UBL schemas SHOULD NOT use xsd:appinfo. If used, xsd:appinfo
MUST be used only to convey non-normative information.
Hi All,
I'd like opinions on this approach.
The goal is to be able to add semantics to complexType definitions via
links to controlled vocabularies or even Wikpedia, wherever ...
I prefer to keep all of the information in one appinfo section of the
schema. The applications will then know how to extract all of the
metadata including references to external source used in defining the
concept in each complexType.
Does this approach (below) make sense? It seems to me an application
can use XQuery/XPath to examine and provide links to external sources.
IS there a better, more standard approach to this? I want to markup
added to the schemas not to the instance data as some people might
normally think of doing.
Basically the rdf:about refers to the complexType in the same schema.
Thanks,
Tim
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:mlhim2="http://www.mlhim.org/xmlns/mlhim2/2_4_1"
targetNamespace="http://www.mlhim.org/xmlns/mlhim2/2_4_1"
elementFormDefault="qualified">
<!-- Metadata section -->
<xs:annotation>
<xs:appinfo>
<rdf:RDF>
<!-- Lots of standard Dublin core metadata here -->
<rdf:Description rdf:about="mlhim2:ct-a">
<rdfs:isDefinedBy
rdf:resource="http://some_controlled_vocabulary.org/code_name1" />
<!-- possible multiple entries -->
</rdf:Description>
<rdf:Description rdf:about="mlhim2:ct-b">
<rdfs:isDefinedBy
rdf:resource="http://some_controlled_vocabulary.org/code_name2"/>
</rdf:Description>
</rdf:RDF>
</xs:appinfo>
</xs:annotation>
<!-- Type definitions -->
<xs:complexType name="ct-a">
<!-- assume some restriction definition here -->
</xs:complexType>
<xs:complexType name="ct-b">
<!-- assume some restriction definition here -->
</xs:complexType>
</xs:schema>
_______________________________________________________________________
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