Re: ditavalref ditaval file not recognized and excluded during processing


Radu Coravu
 

Hi Eric,

There is an issue reported here about filtering not working on some branches when using keyrefs:

https://github.com/dita-ot/dita-ot/issues/3551

It may be related to what you are experiencing.

Regards,
Radu
Radu Coravu
Oxygen XML Editor
On 9/10/20 4:20 PM, Eric Sirois wrote:

So the main issue was that there was a key defined for the ditaval, but it didn’t have @format set on the keyref so the OT was interpreting it as a DITA topic, this the errors regarding the missing class attributes.

So I removed all the keydef, keyref and replaced everything with href.  The issue now is that the filtering only works for 2 of the 3 branches. I’m going to look at it a bit more this afternoon.  I was able to replicate the issue with 3.4.1 and 3.5.1.

Eric


Sent from Rogers Yahoo Mail for iPhone

On Wednesday, September 9, 2020, 5:58 PM, Dan Vint <dvint@...> wrote:

Hmm, didn't get any guidance from editor on that one. I switched all of those to hers and got the same results and same messages.



Sent from my Verizon, Samsung Galaxy smartphone


-------- Original message --------
Date: 9/9/20 2:28 PM (GMT-08:00)
Subject: Re: [dita-users] ditavalref ditaval file not recognized and excluded during processing

You should not be able to use key references on ditavalref--the DTD for your map should not allow @keyref on <ditavalref>, so the fact that you have it there suggests something is not right with the DTD (or else the document is not actually valid).

From the DITA 1.3 spec:

2.4.4.5 Branch filtering: Implications of processing order

Because the branch filtering process can result in new or renamed keys, key scopes, or URIs, the full effects of
the branch filtering process MUST be calculated by processors before they construct the effective map and key
scope structure.

Note: The @keyref attribute and related attributes are explicitly disallowed on <ditavalref>. This prevents
any confusion resulting from a @keyref that resolves to additional key- or resource-renaming metadata.

So your map structure is not correct per the spec--you'll need to make direct URI references to your ditaval files.

Cheers,

E.
--
Eliot Kimber
http://contrext.com


On 9/9/20, 4:13 PM, "Dan Vint" <main@dita-users.groups.io on behalf of dvint@...> wrote:

    I'm not sure what is going on. I'm trying to setup a map that will have
    different sections that have the same content but will be filtered with
    with ditvals for different results. My main map references several other
    maps for those sections and each section/submap uses a different
    ditaval.

    The setup and content of these objects are correct and validate. But
    when I run them through the DITA-OT version = 3.4.1 OT, it looks like
    the dtaval files are not being recognized as ditaval files and they are
    being stripped out. End result is that my content is not being filtered.
    Here are the OT messages

    gen-list:
      [gen-list] Using Xerces grammar pool for DTD and schema caching.
      [gen-list] Processing
    file:/Users/danvint/Desktop/_multi-ditaval/_fkn1599574223928.ditamap
      [gen-list] Processing
    file:/Users/danvint/Desktop/_multi-ditaval/dyr1599584459162.ditaval
      [gen-list] [DOTJ030I][INFO] No 'class' attribute for was found for
    element '<val>'. The element will be processed as an unknown or non-DITA
    element.
      [gen-list] [DOTJ030I][INFO] No 'class' attribute for was found for
    element '<prop>'. The element will be processed as an unknown or
    non-DITA element.
      [gen-list] [DOTJ030I][INFO] No 'class' attribute for was found for
    element '<prop>'. The element will be processed as an unknown or
    non-DITA element.
      [gen-list] [DOTJ030I][INFO] No 'class' attribute for was found for
    element '<prop>'. The element will be processed as an unknown or
    non-DITA element.
      [gen-list] [DOTJ030I][INFO] No 'class' attribute for was found for
    element '<prop>'. The element will be processed as an unknown or
    non-DITA element.
      [gen-list] [DOTJ030I][INFO] No 'class' attribute for was found for
    element '<prop>'. The element will be processed as an unknown or
    non-DITA element.
      [gen-list] [DOTJ021E][ERROR] File
    'file:/Users/danvint/Desktop/_multi-ditaval/dyr1599584459162.ditaval'
    will not generate output because because all content has been filtered
    out by DITAVAL "exclude" conditions, or because the file is not valid
    DITA.

    That ditaval file looks like this

    <?xml version="1.0" encoding="UTF-8"?>
    <val>
    <prop action="include"/>
    <prop action="include" att="platform"/>
    <prop action="include" att="audience"/>
    <prop action="include" att="rev"/>
    <prop action="include" att="otherprops"/>
    <prop action="include" att="deliveryTarget"/>
    <prop action="include" att="product"/>
    <prop action="exclude" att="product" val="prod_b"/>
    <prop action="include" att="product" val="prod_a"/>
    </val>


    My root map has this

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE map PUBLIC "-//PINGIDENTITY//DTD DITA Map//EN"
    "PingIdentityMap.dtd">
    <map id="fkn1599574223928" xml:lang="en-us">
    <title>FORMAT: multiditaval - ditavalref testing</title>
    <topicmeta> </topicmeta>


    <keydef href="dyr1599584459162.ditaval" keys="dyr1599584459162"
    xtrc="ixiasoft.drm.remove"/>
    <keydef href="msz1599584786347.ditaval" keys="msz1599584786347"
    xtrc="ixiasoft.drm.remove"/>
    <keydef href="kgo1599578351118.ditamap" keys="kgo1599578351118"
    xtrc="ixiasoft.drm.remove"/>
    <keydef href="vva1599578551353.dita" keys="vva1599578551353"
    xtrc="ixiasoft.drm.remove"/>
    <keydef href="sfq1599578470970.dita" keys="sfq1599578470970"
    xtrc="ixiasoft.drm.remove"/>
    <keydef href="wkc1599578503581.dita" keys="wkc1599578503581"
    xtrc="ixiasoft.drm.remove"/>
    <keydef href="cjq1599588363521.ditamap" keys="cjq1599588363521"
    xtrc="ixiasoft.drm.remove"/>
    <keydef href="tur1599578307311.ditamap" keys="tur1599578307311"
    xtrc="ixiasoft.drm.remove"/>
    <keydef href="vln1599578426163.dita" keys="vln1599578426163"
    xtrc="ixiasoft.drm.remove"/>
    <keydef href="fjg1599584933747.ditaval" keys="fjg1599584933747"
    xtrc="ixiasoft.drm.remove"/>
    <keydef href="liz1599578247043.ditamap" keys="liz1599578247043"
    xtrc="ixiasoft.drm.remove"/>
    <topichead navtitle="All content no filters">
    <mapref format="ditamap" keyref="cjq1599588363521"/>
    </topichead>

    <topichead navtitle="Common Content only - Exclude A and B ">
    <mapref format="ditamap" keyref="liz1599578247043"/>
    </topichead>

    <topichead navtitle="Product A - Exclude B">
    <mapref format="ditamap" keyref="tur1599578307311"/>
    </topichead>
    <topichead navtitle="Product B - Exclude A">
    <mapref format="ditamap" keyref="kgo1599578351118"/>
    </topichead>


    </map>

    The map using that particular ditaval is structured this way

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE map PUBLIC "-//PINGIDENTITY//DTD DITA Map//EN"
    "PingIdentityMap.dtd">
    <map id="tur1599578307311" xml:lang="en-us">
    <title>FORMAT: Product A content only</title>
    <topicmeta> </topicmeta>

    <ditavalref keyref="dyr1599584459162" processing-role="resource-only"/>
    <topicref keyref="vln1599578426163"/> <!-- topic with ditavals -->
    <topicref keyref="sfq1599578470970"/> <!-- topic product A -->
    <topicref keyref="wkc1599578503581"/> <!-- topic product B -->
    <topicref keyref="vva1599578551353"/> <!-- topic all -->

    </map>

    I've attached a zipfile of the complete fileset.

    I looked to see if there was any other setup required. I thought maybe a
    processing-role was required, but I see that ditavalref defaults to
    resource only.

    ..dan










  

Join main@dita-users.groups.io to automatically receive all group messages.