Additions to the GN4.XSD schema for the section based color

Build 1501 on 14/Nov/2017  This topic last edited on: 15/Sep/2016, at 17:18

The variables defined under pageExtra are to be called by >co !@pg_sectionColor!< and >co !@pg_sectionHead!<. The variables defined under txtExtra are to be called by >co !@tx_sectionColor!< and >co !@tx_sectionHead!<.

  <xs:group name="pageExtra">

    <xs:annotation>

      <xs:documentation>Additional attributes of the 'page' object type that are rendered as XML element</xs:documentation>

      <xs:appinfo>

        <gs:compute inherit="true">

          <page>

            <xsl:variable name="sectionName" select="fn:replace(gn4:sectionRef/*/gn4:section/@name,' +','')"/>

            <sectionColor>

              <xsl:value-of select="concat('color',$sectionName)"/>

            </sectionColor>

            <sectionHead>

              <xsl:value-of select="concat('head',$sectionName)"/>

            </sectionHead>

          </page>

        </gs:compute>

      </xs:appinfo>

    </xs:annotation>

    <xs:sequence>

      <xs:element name="sectionColor" default="" type="xs:string" gs:compute="true">

        <xs:annotation>

          <xs:documentation>Section color</xs:documentation>

        </xs:annotation>

      </xs:element>

      <xs:element name="sectionHead" default="" type="xs:string" gs:compute="true">

        <xs:annotation>

          <xs:documentation>Headline color by section</xs:documentation>

        </xs:annotation>

      </xs:element>

    </xs:sequence>

  </xs:group>

 

....

 

<xs:group name="txtExtra">

    <xs:annotation>

      <xs:documentation>Additional attributes of the 'txt' object type that are rendered as XML element</xs:documentation>

      <xs:appinfo>

        <gs:compute inherit="true">

          <txt>

            <xsl:if test="gn4:pageLayers">

              <xsl:variable name="sectionName" select="gn4:pageLayers/gn4:item[1]/gn4:pageRef/*/gn4:page/gn4:sectionRef/*/gn4:section/@name"/>

              <sectionColor>

                <xsl:value-of select="concat('color',$sectionName)"/>

              </sectionColor>

              <sectionHead>

                <xsl:value-of select="concat('head',$sectionName)"/>

              </sectionHead>

            </xsl:if>

          </txt>

        </gs:compute>

      </xs:appinfo>

    </xs:annotation>

    <xs:sequence>

      <xs:element name="authorRef" type="reference" minOccurs="0" nillable="true" gs:refer="user">

        <xs:annotation>

          <xs:documentation>Author of the text - it can be different that the creator if the text is being entered in the system on behalf of someone else</xs:documentation>

        </xs:annotation>

      </xs:element>

      <xs:element name="notes" type="tDescription" minOccurs="0">

        <xs:annotation>

          <xs:documentation>Copy-flow notes</xs:documentation>

        </xs:annotation>

      </xs:element>

      <xs:sequence>

        <xs:element name="sectionColor" default="" type="xs:string" gs:compute="true" minOccurs="0" nillable="true">

          <xs:annotation>

            <xs:documentation>Section color</xs:documentation>

          </xs:annotation>

        </xs:element>

        <xs:element name="sectionHead" default="" type="xs:string" gs:compute="true" minOccurs="0" nillable="true">

          <xs:annotation>

            <xs:documentation>Headline color by section</xs:documentation>

          </xs:annotation>

        </xs:element>

      </xs:sequence>

    </xs:sequence>

  </xs:group>