From version 1.4.1426.0 it is possible to inherit the auto-compute XSLT of an ancestor object - using the inherit attribute of the gs:compute element, e.g.:
<gs:compute inherit="true">
<archiveObject>
<!-- Useful variables -->
<xsl:variable name="now" select="$context/oc:OperationContext/@UtcNow"/>
<!-- Copyrights status and expiration date -->
<xsl:variable name="copyrights" select="gn4:rights/gn4:ref/nav:refObject/gn4:copyright"/>
. . .
</archiveObject>
</gs:compute>
defines the auto-compute XSLT for archiveObject inheriting also the folderObject one, so it is no longer necessary to duplicate the part computing creation and modification date-time and users.
The 'inherit' attribute is optional - defaulting to false - i.e. to the previous behavior of executing only that single XSLT for the object type.
The inheritance can be extended to multiple levels; e.g. image inheriting from archiveObject inheriting from folderObject.
The system executes the entire chain of XSLT and combines their result, with the 'most derived' one having the precedence, so that if the same attribute is defined by the XSLTs of archiveObject and folderObject the system will use the one defined for archiveObject.
Inheritance can be used only if all XSLTs in the inheritance chain use the semplified syntax (see http://forum.teradp.com/topic.asp?TOPIC_ID=582).
The same inheritance system can be used to define additional auto-computed attributes for built-in object types - i.e. those defined in GN4Base.xsd, GN4Archive.xsd and GN4Editorial.xsd - without having to touch these schema files. To do this add the definition of the auto-computed attribute and the relative XSLT in the extraXXXX extenstion group, so for example to define a new auto-computed attribute for article:
<xs:group name="articleExtra">
<xs:annotation>
<xs:documentation>Additional attributes of the 'article' object type that are rendered as XML element</xs:documentation>
<xs:appinfo>
<gs:compute inherit="true">
<article>
<xsl:variable name="photoThumb" select="gn4:txts/gn4:photoCaption[1]/gn4:ref/nav:refObject/gn4:img/gn4:thumbnail"/>
. . .
</article>
</gs:compute>
</xs:appinfo>
</xs:annotation>
<xs:sequence>
<xs:group ref="archiveObjectExtra"/>
<xs:element name="articleThumb" type="dataContent" minOccurs="0" gs:compute="true">
<xs:annotation>
<xs:documentation>Article thumbnail automatically copied from the first photo in the article (if any)</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:group>
This additional XSLT will be executed together (and taking precedence on) the built-in one for article. Note that if inherited is not specified it defaults to false, that means that ONLY this XSLT will be executed for article - probably not what is wanted.
Note
This topic on the forum: http://forum.teradp.com/topic.asp?TOPIC_ID=808
See also
Defining auto-computed attributes