[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [dita] DITA and Namespaces? A Potential Compromise Solution for DITA 1.3?
On 17.5.2012 22:42, Eliot Kimber wrote:
> That leaves the problem of validating that a given element is in fact the element type named in its class value. For example, consider these two elements:
>
> <bar:foo xmlns:bar="http://example.com/ns1"
> class="- topic/topic bar:foo/bar:foo "
>>
>
> <foo xmlns="http://example.com/ns1"
> class="- topic/topic bar:foo/bar:foo "
>>
>
> Both elements are of the same type--{http://example.com/ns1}:foo--but the first one satisfies the DITA "tagname matches class" rule and the second does not.
>
> To enable complete validation of the type to the class, we would need a separate DITA-specific namespace declaration, e.g.:
>
> <foo xmlns="http://example.com/ns1"
> xmlns:dita_ns="http://oasis-open.org/DITA/namespace/DITA-ns-prefix-binding"
> dita_ns:bar="http://example.com/ns1"
> class="- topic/topic bar:foo/bar:foo "
Wouldn't it be easier to use Clark notation in @class and prevent all
problems related to prefixes and QNames used in attributes, something like:
<bar:foo xmlns:bar="http://example.com/ns1"
class="- topic/topic
{http://example.com/ns1}foo/{http://example.com/ns1}foo "
@class would be verbose then but this shouldn't matter as it is
automatically injected from schema into document.
I think that given current performance penalty of relying on @class
values for matching using indirection mechanism here (prefixes) would
decrease perfomance by another grade.
Jirka
--
------------------------------------------------------------------
Jirka Kosek e-mail: jirka@kosek.cz http://xmlguru.cz
------------------------------------------------------------------
Professional XML consulting and training services
DocBook customization, custom XSLT/XSL-FO document processing
------------------------------------------------------------------
OASIS DocBook TC member, W3C Invited Expert, ISO JTC1/SC34 member
------------------------------------------------------------------
Attachment:
signature.asc
Description: OpenPGP digital signature
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]