[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: Key precedence, binding of controlled values, and subjectScheme
My take ... For question #1 - I think the duplicate key is ignored, and that your understanding is correct. Where is that example today in the spec? For question #2 - I think the goal there is to extend the values, rather than to override. The idea of a baseScheme pulled in with <schemeref> is that the baseScheme supplies a core set of value, and the local scheme extends it with local values (rather than changing it). I haven't done a deep read of this scenario in the spec lately, but it seems to be backed up by the definition of <schemeref>: Typically, the referenced scheme defines a base set of controlled values extended by the current scheme. The values in the referenced scheme are merged with the current scheme; the result is equivalent to specifying all of the values in a single map. http://docs.oasis-open.org/dita/v1.2/os/spec/langref/schemeref.html That said, the examples in the spec show extending a category already associated with @platform, rather than defining a second set of values associated with @platform, so I don't think your exact example is covered today (at least in the examples I found in a quick check). Robert D Anderson IBM Authoring Tools Development Chief Architect, DITA Open Toolkit (http://dita-ot.sourceforge.net/) From: Kristen James Eberlein <kris@eberleinconsulting.com> To: DITA TC <dita@lists.oasis-open.org>, Cc: Eliot Kimber <ekimber@reallysi.com>, Robert D Anderson/Rochester/IBM@IBMUS Date: 03/07/2013 14:34 Subject: Key precedence, binding of controlled values, and subjectScheme As I work through the subjectScheme topics, I've developed the following questions: 1) In the following scenario, what happens to the subject definition with a duplicate key? Is it ignored and thus the subject definitions that it contains are also ignored? <subjectScheme> <subjectdef keys="os"> <subjectdef keys="solaris"/> <subjectdef keys="hpunix"/> </subjectdef> . . . <subjectdef keys="os"> <subjectdef keys="linux"/> <subjectdef keys="mswin"/> <subjectdef keys="zos"/> </subjectdef> We essentially have this code example in the spec. I would have assumed that the 2nd subject definition would need to reference the os subject by the @keyref attribute in order to merge additional subjects ... 2) What about the following situation? Is the 2nd binding of the @platform attribute ignored, or does it override the binding in the base scheme? Here is the contents of baseScheme.ditamap, which defines the os subject and binds its values to the @platform attribute: <subjectScheme> <subjectdef keys="os" navtitle="Operating system"> <subjectdef keys="linux" navtitle="Linux"> <subjectdef keys="redhat" navtitle="RedHat Linux"/> <subjectdef keys="suse" navtitle="SuSE Linux"/> </subjectdef> <subjectdef keys="mswin" navtitle="Windows"/> <subjectdef keys="zos" navtitle="z/OS"/> </subjectdef> <enumerationdef> <attributedef name="platform"/> <subjectdef keyref="os"/> </enumerationdef> </subjectScheme> Another subjectScheme map contains the following content: <subjectScheme> <schemeref href="baseScheme.ditamap"/> . . . <subjectdef keys="app" navtitle="Applications"> <subjectdef keys="apacheserv" navtitle="Apache Web Server"/> <subjectdef keys="mysql" navtitle="MySQL Database"/> </subjectdef> . . . <enumerationdef> <attributedef name="platform"/> <subjectdef keyref="app"/> </enumerationdef> </subjectScheme> Best, Kris Kristen James Eberlein Principal consultant, Eberlein Consulting Co-chair, OASIS DITA Technical Committee Charter member, OASIS DITA Adoption Committee www.eberleinconsulting.com +1 919 682-2290; kriseberlein (skype)
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]