Re: Extended ODF schema

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Laurent,


I see no problem in your new version below, but Michael is the expert for RELAX. Perhaps he knows a solution.

Here only some ideas, what you could do:
Do you have inspect the tmp file of the failing test, whether it really has the expected markup? Do you have confirmed, that your <rng:define name="number-text"> element, which is added into the <rng:include> element, is not inside another define-element by mistake. Do you have tried, whether a combine="choice" works? Similar as for the loext:clear attribute of the text:line-break element?

Kind regards,
Regina

Laurent Balland schrieb am 10.02.2023 um 19:23:
Hello,

Le 08/02/2023 à 14:09, Michael Stahl a écrit :

if it should go on the numer:text element, it needs to be a child of its rng:element - currently it's not extensible (via "combine" feature):

  <rng:define name="number-text">
    <rng:element name="number:text">
      <rng:text/>
    </rng:element>
  </rng:define>

so you have to override it - at the start of the libreoffice schema there is an rng:include, paste the above into this include element and adapt it - this will override what is in the included file.

Thanks for your feedback. I made some progress, but it does not yet work.

I added in rng:include

     <rng:define name="number-text">
       <rng:element name="number:text">
         <rng:optional>
           <rng:ref name="number-text-attlist"/>
         </rng:optional>
         <rng:text/>
       </rng:element>

   </rng:define>

and define number-text-attlist outside rng:include

   <rng:define name="number-text-attlist">
     <rng:interleave>
       <rng:optional>
         <rng:attribute name="loext:blank-width-char">
           <rng:ref name="string"/>
         </rng:attribute>
       </rng:optional>
     </rng:interleave>
   </rng:define>

Then I get the following errors:

- /tmp/libtest_sc_sparkline_test.sorjp6.tmp/styles.xml[2,9446]: Error: tag name "number:text" is not allowed. Possible tag names are: <fraction>,<map>,<number>,<scientific-number> number:text loext:blank-width-char=")"> </number:text><number:text/></number:nu
                                  ----^
/tmp/libtest_sc_sparkline_test.sorjp6.tmp/styles.xml[2,10964]: Error: tag name "number:text" is not allowed. Possible tag names are: <map>,<number> number:text loext:blank-width-char=")"> </number:text></number:currency-style><

I do not understand what I made wrong. Why validator is expecting loext:blank-width-char with other tags than number:text?

Best regards

Laurent Balland






[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux