Skip to content

Commit 68b72f3

Browse files
authored
Merge pull request #1784 from CruGlobal/specWebTextAttributes
GT-2585 Add more web overrides for text attributes
2 parents 2685c6d + e73fb6e commit 68b72f3

File tree

3 files changed

+25
-12
lines changed

3 files changed

+25
-12
lines changed

public/xmlns/content.xsd

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -589,35 +589,25 @@
589589
</xs:documentation>
590590
</xs:annotation>
591591
</xs:attribute>
592-
<xs:attribute name="start-image-size" default="40">
592+
<xs:attribute name="start-image-size" type="content:textImageSize" default="40">
593593
<xs:annotation>
594594
<xs:documentation>Defines the size in "density-independent pixels"/"points" of the start
595595
image. This defaults to 40.
596596
</xs:documentation>
597597
</xs:annotation>
598-
<xs:simpleType>
599-
<xs:restriction base="xs:int">
600-
<xs:minInclusive value="1" />
601-
</xs:restriction>
602-
</xs:simpleType>
603598
</xs:attribute>
604599
<xs:attribute name="end-image" type="xs:string">
605600
<xs:annotation>
606601
<xs:documentation>Defines an image to display to the "end" of this text node.
607602
</xs:documentation>
608603
</xs:annotation>
609604
</xs:attribute>
610-
<xs:attribute name="end-image-size" default="40">
605+
<xs:attribute name="end-image-size" type="content:textImageSize" default="40">
611606
<xs:annotation>
612607
<xs:documentation>Defines the size in "density-independent pixels"/"points" of the end
613608
image. This defaults to 40.
614609
</xs:documentation>
615610
</xs:annotation>
616-
<xs:simpleType>
617-
<xs:restriction base="xs:int">
618-
<xs:minInclusive value="1" />
619-
</xs:restriction>
620-
</xs:simpleType>
621611
</xs:attribute>
622612

623613
<xs:attribute name="minimum-lines" default="0" type="content:textMinimumLines">
@@ -629,6 +619,7 @@
629619
</xs:attribute>
630620

631621
<xs:attributeGroup ref="content:baseAttributes" />
622+
<xs:attributeGroup ref="web:contentTextElement" />
632623
</xs:extension>
633624
</xs:simpleContent>
634625
</xs:complexType>
@@ -680,6 +671,11 @@
680671
</xs:sequence>
681672
</xs:complexType>
682673

674+
<xs:simpleType name="textImageSize">
675+
<xs:restriction base="xs:int">
676+
<xs:minInclusive value="1" />
677+
</xs:restriction>
678+
</xs:simpleType>
683679
<xs:simpleType name="textMinimumLines">
684680
<xs:restriction base="xs:int">
685681
<xs:minInclusive value="0" />

public/xmlns/web.xsd

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,25 @@
2727

2828
<!-- region: content:text attributes -->
2929
<xs:attribute name="font-weight" type="content:fontWeight" />
30+
<xs:attribute name="text-align" type="content:horizontalGravity" />
31+
<xs:attribute name="text-color" type="content:colorValue" />
3032
<xs:attribute name="text-scale" type="xs:float" />
33+
<xs:attribute name="text-style" type="content:textStyles" />
34+
35+
<xs:attribute name="start-image-size" type="content:textImageSize" />
36+
<xs:attribute name="end-image-size" type="content:textImageSize" />
3137
<xs:attribute name="minimum-lines" type="content:textMinimumLines" />
3238

3339
<xs:attributeGroup name="contentTextType">
3440
<xs:attribute ref="web:font-weight" />
41+
<xs:attribute ref="web:text-align" />
42+
<xs:attribute ref="web:text-color" />
3543
<xs:attribute ref="web:text-scale" />
44+
<xs:attribute ref="web:text-style" />
45+
</xs:attributeGroup>
46+
<xs:attributeGroup name="contentTextElement">
47+
<xs:attribute ref="web:start-image-size" />
48+
<xs:attribute ref="web:end-image-size" />
3649
<xs:attribute ref="web:minimum-lines" />
3750
</xs:attributeGroup>
3851
<!-- endregion: content:text attributes -->
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<content:text xmlns:content="https://mobile-content-api.cru.org/xmlns/content"
2+
xmlns:web="https://mobile-content-api.cru.org/xmlns/web" font-weight="400" minimum-lines="2" text-align="center"
3+
text-color="rgba(255,0,0,1)" text-style="italic" web:font-weight="700" web:minimum-lines="5"
4+
web:text-align="start" web:text-color="rgba(0,255,255,1)" web:text-style="underline" />

0 commit comments

Comments
 (0)