Lists Home |
Date Index |
- From: "Arnold, Curt" <Curt.Arnold@hyprotech.com>
- To: "'firstname.lastname@example.org'" <email@example.com>
- Date: Fri, 22 Sep 2000 12:18:04 -0600
Namespaces should be explicit, at least, when each namespace is describes a different domain. For example, if I build a camera namespace and need to have hypertext embedded at certain locations, the
best approach is to import the standard XHTML namespace and use qualified XHTML elements for example <xhtml:p> for paragraph. This allows existing XHTML processing code to work on the embedded XHTML.
If a distinct, but semantically similar "Camera Hypertext Markup Language" was created, existing XHTML processing code would have to be modified to recognize <camera:p> as being identical in semantics
The example you contrived has multiple namespaces that cover at closely related information, hence the impetus to unify these in the instance document vs in the schema.
A much better design would be for the camera namespace to declare the framework for the document and individual vendor namespaces to be used for vendor-specific information. For example:
<fubar:lens xmlns:fubar="http://www.fubar.com/camera" partNo="fb10204" inspector="#3454"/>
<zeon:body xmlns:zeon="http://www.zeon.com/camera" material="titanium"/>
The camera namespace can be declare to allow elements from outside namespaces using the <xsd:any> particle or equiv classes could be used (for example, fubar:lens could be in the camera:vendorLens
[Interestingly, for the video-game schema I don't
see how to make geometry, lighting, and voice global. Any thoughts?]
They are only global (and only accessible from other namespaces) if they appear at the top level in the imported schemas.