[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [office] OFFICE-3765
On 26/04/18 16:11, Michael Stahl wrote:
... see attachment for the complete diff ... then we need some prose to limit the number of fill-character elements again...On 26/04/18 15:42, Regina Henschel wrote:Hi Michael, Michael Stahl schrieb am 24.04.2018 um 13:35:hi all, so i've played around with the interleave idea and it does appear to work with the ODF Toolkit validator, complaining about the invalid duplicate or wrongly nested fill-character elements;[..]hence i've added a schema diff to the proposal of the issue.Can you please test the attached file? It has<number:number-style style:name="N10121" number:language="en" number:country="US" number:title="fill"> <number:scientific-number number:decimal-places="2" number:min-integer-digits="1" number:min-exponent-digits="2"/><number:text> </number:text> <number:fill-character>~</number:fill-character> <number:text>m</number:text> </number:number-style>I have tested it with xmllint, but that fails. I guess xmllint is wrong here.The corresponding format code in LibreOffice is 0.00E+00" "*~"m"The use case is, to have at least one blank and the unit "m" right aligned. I have uses ~ as fill character, so that it is better visible; in the use case, you would have a blank as fill character.this isn't allowed:FillSplitScientificManual.ods/styles.xml[22,20]: Error: tag name "number:text" is not allowed. Possible tag names are: <map><number:text>m</number:text> ----^ and if i remove the number:fill-character:/tmp/FillSplitScientificManual.ods/styles.xml[21,20]: Error: tag name "number:text" is not allowed. Possible tag names are: <map><number:text>m</number:text> ----^... so what you want to do is essentially split one <number:text> in two? can't be done with this schema, and you can't put number:fill-character inside number:text either with it.... it might work to put an <optional><element "number:text"></optional> right after the number:fill-character ... however that would also allow 2 consecutive number:text in some cases ...if this feature is really needed i'd rather do something like this:
-- Michael Stahl Senior Software-Entwickler LibreOffice ––– CIB software GmbH Geschäftsstelle Hamburg Flachsland 10 22083 Hamburg ––– T +49 (40) / 28 48 42 -296 F +49 (40) / 28 48 42 -100 Michael.Stahl@cib.de www.cib.de ––– Sitz: München Registergericht München, HRB 123286 Geschäftsführer: Dipl.-Ing. Ulrich Brandner
--- Downloads/OpenDocument-v1.2-os-schema.rng 2018-04-06 13:21:47.000000000 +0200 +++ OFFICE-3765.rng-v2 2018-04-26 16:29:04.895877657 +0200 @@ -12608,20 +12608,20 @@ <define name="number-number-style"> <element name="number:number-style"> <ref name="common-data-style-attlist"/> <optional> <ref name="style-text-properties"/> </optional> <optional> - <ref name="number-text"/> + <ref name="number-text-with-fillchar"/> </optional> <optional> <ref name="any-number"/> <optional> - <ref name="number-text"/> + <ref name="number-text-with-fillchar"/> </optional> </optional> <zeroOrMore> <ref name="style-map"/> </zeroOrMore> </element> </define> @@ -12712,15 +12712,15 @@ <element name="number:currency-style"> <ref name="common-data-style-attlist"/> <ref name="common-auto-reorder-attlist"/> <optional> <ref name="style-text-properties"/> </optional> <optional> - <ref name="number-text"/> + <ref name="number-text-with-fillchar"/> </optional> <optional> <choice> <group> <ref name="number-and-text"/> <optional> <ref name="currency-symbol-and-text"/> @@ -12738,21 +12738,21 @@ <ref name="style-map"/> </zeroOrMore> </element> </define> <define name="currency-symbol-and-text"> <ref name="number-currency-symbol"/> <optional> - <ref name="number-text"/> + <ref name="number-text-with-fillchar"/> </optional> </define> <define name="number-and-text"> <ref name="number-number"/> <optional> - <ref name="number-text"/> + <ref name="number-text-with-fillchar"/> </optional> </define> <define name="number-currency-symbol"> <element name="number:currency-symbol"> <ref name="number-currency-symbol-attlist"/> <text/> </element> @@ -12782,15 +12782,15 @@ <define name="number-percentage-style"> <element name="number:percentage-style"> <ref name="common-data-style-attlist"/> <optional> <ref name="style-text-properties"/> </optional> <optional> - <ref name="number-text"/> + <ref name="number-text-with-fillchar"/> </optional> <optional> <ref name="number-and-text"/> </optional> <zeroOrMore> <ref name="style-map"/> </zeroOrMore> @@ -12801,20 +12801,20 @@ <ref name="common-data-style-attlist"/> <ref name="common-auto-reorder-attlist"/> <ref name="common-format-source-attlist"/> <optional> <ref name="style-text-properties"/> </optional> <optional> - <ref name="number-text"/> + <ref name="number-text-with-fillchar"/> </optional> <oneOrMore> <ref name="any-date"/> <optional> - <ref name="number-text"/> + <ref name="number-text-with-fillchar"/> </optional> </oneOrMore> <zeroOrMore> <ref name="style-map"/> </zeroOrMore> </element> </define> @@ -12958,20 +12958,20 @@ <ref name="number-time-style-attlist"/> <ref name="common-data-style-attlist"/> <ref name="common-format-source-attlist"/> <optional> <ref name="style-text-properties"/> </optional> <optional> - <ref name="number-text"/> + <ref name="number-text-with-fillchar"/> </optional> <oneOrMore> <ref name="any-time"/> <optional> - <ref name="number-text"/> + <ref name="number-text-with-fillchar"/> </optional> </oneOrMore> <zeroOrMore> <ref name="style-map"/> </zeroOrMore> </element> </define> @@ -13078,27 +13078,43 @@ <define name="number-text-style"> <element name="number:text-style"> <ref name="common-data-style-attlist"/> <optional> <ref name="style-text-properties"/> </optional> <optional> - <ref name="number-text"/> + <ref name="number-text-with-fillchar"/> </optional> <zeroOrMore> <ref name="number-text-content"/> <optional> - <ref name="number-text"/> + <ref name="number-text-with-fillchar"/> </optional> </zeroOrMore> <zeroOrMore> <ref name="style-map"/> </zeroOrMore> </element> </define> + <define name="number-text-with-fillchar"> + <optional> + <ref name="number-text"/> + </optional> + <optional> + <ref name="number-fill-character"/> + <optional> + <ref name="number-text"/> + </optional> + </optional> + </define> + <define name="number-fill-character"> + <element name="number:fill-character"> + <text/> + </element> + </define> <define name="number-text"> <element name="number:text"> <text/> </element> </define> <define name="number-text-content"> <element name="number:text-content">
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]