[
Lists Home |
Date Index |
Thread Index
]
From: "james anderson" <james.anderson@setf.de>
> I agree, that it is gratuitous to require that xmlns:* attributes be declared for an element to be valid.
Is there any need for explicit namespace declarations in the DTD at all?
Why not just assign whole element sets to a namespace, in the external DSDL framework,
and leave the syntax of DTDs exactly as it is? That would seem to be more manageable,
because then people can use their current non-namespace DTDs without needing to change
them. And it would be easier to make GUI tools for too, which is a definite consideration IMHO.
Namespaces were designed for modularity, so I don't believe there is any urgency
to support arbitrary mixes of namespace declarations in the same entity.
So you would have an element set for CALs, an element set for DOCBOOK, and an element
set for XLink. The framework document could have something like:
<xmlDtd>
<namespaceMappings>
<namespace
uri="...namspace for CALS tables"
typicalPrefix="cals"
pubId=" FPI for CALS" >
<systemID>location of declaration</systemID>
</namespace>
<namespace uri="...namspace for docbook"
typicalPrefix="db"
publId="public identifier for DOCBOOK" >
<systemId>location of declaration</systemId>
<systemId>location of some component declaration</systemId>
<systemId>location of another coponent declaration</systemId>
<systemId>location of some other one</systemId>
</namespace>
</namespaceMappings>
</xmlDtd>
Whether this is part of the framework itself, or part of the method
of invoking a DTD as part of a DSDL pipeline, don't forget that
you do have this upper-level of XML-syntax available. There is
probably some sweet spot with DTDs where if you have too many
kinds of declarations it puts more people off than it attracts: I would
expect to see namespace-aware DTDs being translated into RELAX NG
or XML Schemas by an implementation anyway, so in a way they
are really just an alternative syntax for easier transitioning.
But this is discussing techniques before requirements. What are the
requirements for DTDs in DSDL? I would say the requirement is
to support legacy DTDs and tools which help people migrate from
non-namespace documents to namespaced documents easily. In
other words, just the minimum to make DTDs useable for validating
XML documents without DOCTYPE declarations and which use
namespaces.
Cheers
Rick Jelliffe
|