Schema changes

Build 1501 on 14/Nov/2017  This topic last edited on: 24/Oct/2016, at 13:24

Important: apply the changes only if your system uses a custom configuration, and you are upgrading it. If you are installing a new 2.3 or newer system, using the standard default configuration, then there is no need to change anything - the system is Link Assistant ready.

Schema changes

The GN4.XSD is updated with the definition of the image counter.

The additions are highlighted in green:

 <xs:group name="articleExtra">

    <xs:annotation>

      <xs:documentation>Additional attributes of the 'article' object type thatare rendered as XML element</xs:documentation>

      <xs:appinfo>

        <gs:compute inherit="true">

          <article xmlns:msxsl="urn:schemas-microsoft-com:xslt">

            <xsl:variable name="isPub" select="nav:referencing/nav:referencingBy[@attrName='pubDest.objs']/nav:refs"/>

            <!-- 'Fake' test of the handle attribute to generate a dependency -->

            <xsl:if test="string($isPub/@handle)">

              <xsl:choose>

                <xsl:when test="$isPub/nav:refObject/gn4:pubDest">

                  <isPublished>true</isPublished>

                </xsl:when>

                <xsl:otherwise>

                  <isPublished>false</isPublished>

                </xsl:otherwise>

              </xsl:choose>

            </xsl:if>

 

            <xsl:variable name="isLin" select="gn4:txts/*/gn4:pageLayers"/>

            <!-- 'Fake' test of the handle attribute to generate a dependency -->

            <xsl:if test="string($isLin/@nav:handle)">

              <xsl:choose>

                <xsl:when test="$isLin/gn4:item">

                  <isLinked>true</isLinked>

                </xsl:when>

                <xsl:otherwise>

                  <isLinked>false</isLinked>

                </xsl:otherwise>

              </xsl:choose>

            </xsl:if>

            <!-- number of imgs attached to the article. To minimize the compute we are not checking if an img is referenced.-->

            <nImgs>

              <xsl:value-of select="count(gn4:txts/gn4:photoCaption)"/>

            </nImgs>

 

          </article>

        </gs:compute>

      </xs:appinfo>

    </xs:annotation>

    <xs:sequence>

      <xs:group ref="archiveObjectExtra"/>

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

        <xs:annotation>

          <xs:documentation>Author of the article - it can be different than the creator if the article is being entered 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:element name="nImgs" type="tNonNegativeInt" minOccurs="0" default="0" gs:compute="true">

        <xs:annotation>

          <xs:documentation>Number of images linked to the article.</xs:documentation>

        </xs:annotation>

      </xs:element>

    </xs:sequence>

  </xs:group>

You need to load the schema as explained in Import schemas from a file.