lcMatching2 vs. lceChainMatching

birstrack
Posts: 7
Joined: Wed Jun 29, 2011 12:28 pm

lcMatching2 vs. lceChainMatching

Post by birstrack » Mon Nov 25, 2019 1:06 pm

hi,
I have made a DITA specialization which is more or less the same as the lcMatching2, the lceChainMatching.
Both questions are specializations on simpletabel.

When using the lcMatching2 and having following XML, I get no error message:

Code: Select all

<lcMatching2>
                <lcQuestion2></lcQuestion2>
                <lcMatchTable2>
                    <lcMatchingPair2>
                        <lcItem2></lcItem2>
                        <lcMatchingItem2></lcMatchingItem2>
                    </lcMatchingPair2>
                    <lcMatchingPair2>
                        <lcItem2></lcItem2>
                        <lcMatchingItem2></lcMatchingItem2>
                        <lcMatchingItemFeedback2></lcMatchingItemFeedback2>
                    </lcMatchingPair2>
                </lcMatchTable2>
            </lcMatching2>
When using, the new lceChainMatching and having following XML, I get an error message that the second row has more "entrys" than the first one.

Code: Select all

 <lceChainMatching>
                <lcQuestion2></lcQuestion2>
                <lceChainTable>
                    <lceChainRow>
                        <lcItem2></lcItem2>
                        <lcItem2></lcItem2>
                        <lcItem2></lcItem2>
                    </lceChainRow>
                    <lceChainRow>
                        <lcItem2></lcItem2>
                        <lcItem2></lcItem2>
                        <lcItem2></lcItem2>
                        <lcMatchingItemFeedback2></lcMatchingItemFeedback2>
                    </lceChainRow>
                </lceChainTable>
            </lceChainMatching>
I found some older posts and if I get it right, it is a Oxygen configuration why the lMatching2 doesn't cause an error message. Right? And if so, can I configur Oxygen for the new lceChainMatching the same way?

You find my specialization in github: https://github.com/birgitstrackenbrock/ ... velop_v2p2

Radu
Posts: 6579
Joined: Fri Jul 09, 2004 5:18 pm

Re: lcMatching2 vs. lceChainMatching

Post by Radu » Tue Nov 26, 2019 11:43 am

Hi Birgit,

The catalog.xml in your GitHub project is missing two mappings, I added them on my side:

Code: Select all

  <group xml:base="lceMatchInteraction/">
    <system systemId="lceMultipleMatchDomain.xsd" uri="lceMultipleMatchDomain.xsd" />
    <system systemId="urn:dita13lce:names:xsd:lceMultipleMatchDomain.xsd" uri="lceMultipleMatchDomain.xsd" />
    <system systemId="urn:dita13lce:names:xsd:lceChainMatchingDomain.xsd" uri="lceChainMatchingDomain.xsd" />
    
    <uri name="lceMultipleMatchDomain.xsd" uri="lceMultipleMatchDomain.xsd" />
    <uri name="urn:dita13lce:names:xsd:lceMultipleMatchDomain.xsd" uri="lceMultipleMatchDomain.xsd" />
    <uri name="urn:dita13lce:names:xsd:lceChainMatchingDomain.xsd" uri="lceChainMatchingDomain.xsd" />
  </group>
Coming back to the problem, the "lceChainTable" inherits the class attributes of a DITA simple table and Oxygen has a particular validation stage which attempts to validate it as a simple table.
If inside the XSD "dita13.lc.extra-interactions-feature_develop_v2p2\schema\dita_lce\lceMatchInteraction\lceChainMatchingDomain.xsd" you change its default @class attribute value to derive it from "lcMatchTable2" like this:

Code: Select all

                    <xs:attribute ref="class"
                        default="+ topic/simpletable learningInteractionBase2-d/simpletable learning2-d/lcMatchTable2 lcechainmatching-d/lceChainTable "/>
our table checker has some custom code which will skip over it and not consider it a table.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

birstrack
Posts: 7
Joined: Wed Jun 29, 2011 12:28 pm

Re: lcMatching2 vs. lceChainMatching

Post by birstrack » Tue Nov 26, 2019 3:27 pm

hi Radu, thanks, Birgit

Post Reply