RE: [dita-lightweight-dita] templae specialization, some remarks

From
Tim Grantham <>
Date
2016-12-09T15:32:12+00:00
ID
Thread
RE: [dita-lightweight-dita] templae specialization, some remarks
Birgit’s marketing example is a good one for testing the template tool. I will post a response and an update to the tool to address the issues next week.

 

Regards,

Tim.

 

 

From:  [mailto:]
On Behalf Of Michael Priestley

Sent: Wednesday, November 30, 2016 8:12 AM

To: 

Subject: Fw: [dita-lightweight-dita] templae specialization, some remarks

 

Michael Priestley, Senior Technical Staff Member (STSM)

Enterprise Content Technology Strategist



----- Forwarded by Michael Priestley/Toronto/IBM on 11/30/2016 08:11 AM -----

From:        xstructuring02 <>

To:        Michael Priestley/Toronto/IBM@IBMCA

Cc:        FontoXML - Jan Benedictus <>

Date:        11/29/2016 02:17 AM

Subject:        Fwd: [dita-lightweight-dita] templae specialization, some remarks

Dear Michael,

Untortunately, this mail come back. It seems that I am not allowed to send a mail to the whole group.

Can you please forward it? Maybe it is not relevant anymore after the call yesterday, but maybe well.

Kind regards, Birgit

 

 

-------- Oorspronkelijke bericht --------

Onderwerp:

[dita-lightweight-dita] templae specialization, some remarks

Datum:

27-11-2016 11:45

Afzender:

xstructuring02 <>

Ontvanger:



 

Hello Tim and all,

I have tried to generate a RNG from my marketing-template. This was no problem and I have got a RNG. After I got the RNG I have treid to generate a XSD from it (using Oxygen). The XSD I get is not valide. This depends on some
 problems.

First: In the RNG stands:

<start combine="choice">

<element name="marketingtopic">

  <optional>

   <attribute name="class" a:defaultValue="/marketingtopic "/>

 </optional>

<ref name="topic.attributes"/>

<ref name="topic.content"/>

<ref name="title"/>

<element name="prolog">

<ref name="prolog.attlist"/>

</element>

<element name="marketingbody">...

There shouldn't stand a <ref name="topic.content"/> because this make that you get twice the element title and prolog etc. I put this ref in a XML commetn before generating the XSD.

After generating the XSD I get error-messages about the elements I have specialized on <p> and <xref>.

E.g. in my template I have:

<p outputclass="action" important="optional">

<xref outputclass="actionref"/>

</p>

This become in the RNG

<element name="action">

 <optional>

   <attribute name="class" a:defaultValue="/action "/>

 </optional>

 <ref name="p.attributes"/>

 <ref name="p.content"/>

 <element name="actionref">

   <optional>

     <attribute name="class" a:defaultValue="/actionref "/>

   </optional>

 <ref name="xref.attributes"/>

 <ref name="xref.content"/>

 </element>

</element>

This looks ok, but in the XSD it went wrong and I get the message that "E [Xerces] cos-nonambig: image and image (or elements from their substitution group) violate "Unique Particle Attribution". During validation against this
 schema, ambiguity would be created for those two particles."

Honestly, I am not sure if the RNG is wrong or that something went wrong during generating the XSD.

Another problem is that because I cannot define a choice group fort the specialization of section I get a required order even if I set important=”optional” for the child elements.

Example:

<section outputclass="marketingsection" important="optional"> <!-- specmodel="choice" -->

           <dl outputclass="features" important="optional">

               <dlentry outputclass="feature" specmodel="sequence">

                   <dt outputclass="featureterm"/>

                   <dd outputclass="featuredef"/>

               </dlentry>

           </dl>

           <dl outputclass="specifications" important="optional">

               <dlentry outputclass="specification" specmodel="sequence">

                   <dt outputclass="specifiedterm"/>

                   <dd outputclass="specifieddesc"/>

               </dlentry>

           </dl>

           <ul outputclass="highlights" important="optional">

               <li outputclass="highlight"/>

           </ul>

           <p outputclass="action" important="optional">

               <xref outputclass="actionref"/>

           </p>

           <fig outputclass="quote" important="optional">

               <xref outputclass="quoteref"/>

           </fig>

       </section>

When I create a XML-document with the RNG I am not allowed to delete feature within the marketingsection. So we really have to think about how we can specialize elements which basic content model is a sequence of an element
 followed by de choice-group.

Attached you find the template, the RNG and the XSD.

Kind regards, Birgit