OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

dita message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]

Subject: Re: [dita] keyref and -dita-use-conref-target

It was certainly my intent that all the conref rules would apply to keyref
attribute merging, so I would say the answer to your questions is "yes".

In the case of specifying @scope on an xref via key, that must be user error
because the author of the xref cannot know, in the general case, anything
about how the key is defined for a given use of the topic that contains the
xref and therefore specifying any value for @scope or @format must be wrong.

We could codify that case by saying that when the key is resolvable values
for @scope and @format on the element making the key reference are ignored.
But I'm sure I never considered that case at the time (because why would you
do that?).



On 7/2/13 3:03 PM, "Robert D Anderson" <robander@us.ibm.com> wrote:

> Hi,
> Last week we discussed Jarno's question about the "-dita-use-conref-target"
> token. Here is an explanation and some samples to use for discussion.
> As a refresher: when using conref, attributes on the referencing element
> override those on the referenced element. For example, when you resolve the
> following conref, the @outputclass attribute will be preserved even if
> @outputclass is also specified on the referenced paragraph; if other
> attributes are specified on the referenced paragraph (such as @importance),
> they will be pulled with the content:
> <p outputclass="sample" conref="other.dita#topic/p"/>
> When any attribute is required, it is impossible to construct a conref
> without specifying that attribute. The "-dita-use-conref-target" token is a
> way to say "I have to specify this attribute for whatever reason, but I
> don't want it to override the equivalent attribute on the referenced
> element." For example, in this imagined element, resolving conref will
> still pull @href from the element in other.dita:
> <my-special-image href="-dita-use-conref-target"
> conref="other.dita#topic/img"/>
> Note that for conref processors it does not matter if a DTD or Schema
> actually defines the attribute as REQUIRED; processing is based on the
> token rather than the DTD/XSD. A longer explanation and full example are
> available in [1]. So on to Jarno's question: the specification today says
> contains the following language about resolving keys [2]:
> "The attributes that are common to a key definition element and a key
> reference element using that key, other than the @keys, @processing-role,
> and @id attributes, are combined as for content references, including the
> special processing for the @xml:lang, @dir, and @translate attributes. "
> This raised the question of whether the special processing for
> -dita-use-conref-target also applies to keys. Assume that I have the
> following key definition:
> <keydef keys="video" format="mp4" scope="local" href="tutorial.mp4" />
> And the following references:
> 1. <xref keyref="video" scope="external"/>
> 2. <xref keyref="video" scope="-dita-use-conref-target"/>
> Based on the spec, in #1 the @scope attribute on <xref> overrides @scope on
> the referenced key, so the resolved element should be:
> <xref keyref="video" scope="external" format="mp4" href="tutorial.mp4"/>
> In #2, is it correct to assume that the "-dita-use-conref-target" works the
> same as it does for conref? If so, the resolved element should be:
> <xref keyref="video" scope="local" format="mp4" href="tutorial.mp4"/>
> Somewhat related to this, I'd be interested in following up on a related
> example that does not use the conref token. Assume I have the following key
> definition:
> <keydef keys="blobexample" href="localblob.dita" format="dita"
> scope="local"/>
> Now, I have a reference with fallback link information in case the key is
> undefined:
> <xref keyref="blobexample" href="http://www.example.com"; format="html"
> scope="external"/>
> Based on the spec, it seems that the fallback @href is replaced, but
> @format and @scope override the key definition, giving the following
> resolved xref:
> <xref keyref="blobexample" href="localblob.dita" format="html"
> scope="external"/>
> Is that correct? I think this is what the spec would require, but in the
> past we've discussed how @format and @scope are unusual because they are so
> closely tied to the @href value. So, I just want to verify.
> Thanks -
> [1]
> http://docs.oasis-open.org/dita/v1.2/os/spec/common/ditauseconreftarget.html#u
> singthe-dita-use-conref-targetvalue
> [2]
> http://docs.oasis-open.org/dita/v1.2/os/spec/archSpec/processing_key_reference
> s.html
> Robert D Anderson
> IBM Authoring Tools Development
> Chief Architect, DITA Open Toolkit (http://dita-ot.sourceforge.net/)
> ---------------------------------------------------------------------
> To unsubscribe from this mail list, you must leave the OASIS TC that
> generates this mail.  Follow this link to all your TCs in OASIS at:
> https://www.oasis-open.org/apps/org/workgroup/portal/my_workgroups.php

Eliot Kimber
Senior Solutions Architect, RSI Content Solutions
"Bringing Strategy, Content, and Technology Together"
Main: 512.554.9368
Book: DITA For Practitioners, from XML Press,

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]