04-03-2007 11:08 PM
<?xml version="1.0" encoding="UTF-8" ?>
<!–
Document : description.xsl
Created on : 28 March 2007
Author : Scott Middleton
Description:
This stylesheet transforms the description section of a Process Unit.
–>
<xsl:stylesheet version="2.0"
xmlns:xhtml="http://www.w3.org/1999/xhtml"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:pr="http://www.alfresco.org/alfresco/pr"
xmlns:fn="http://www.w3.org/2005/02/xpath-functions"
xmlns:mt="http://www.objectconsulting.com.au/mentor/mt"
xmlns:pm="http://www.processmentor.com"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:alf="http://www.alfresco.org"
>
<xsl:output method="html"></xsl:output>
<xsl:template match="/">
<xsl:apply-templates select="pm:processunit"/>
</xsl:template>
<xsl:template match="pm:processunit">
<h1>Deliverables</h1>
<xsl:choose>
<xsl:when test="pm:deliverables/pm:overview">
<p><b>Overview</b></p>
<xsl:value-of select="pm:deliverables/pm:overview" disable-output-escaping="yes" />
</xsl:when>
<xsl:otherwise>
<p>
The following are deliverables for the <xsl:value-of select="pm:name" /> Process Unit:
</p>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="pm:deliverables/pm:deliverablereference" />
</xsl:template>
<xsl:template match="pm:deliverablereference">
<p>Ref: <xsl:value-of select="pm:ref" /></p>
<!–
pm:ref is something like "/content/xml/Somefile.xml"
Note: this file does exist!
–>
<!– if i comment this 'if' and its contents out then there is output –>
<xsl:if test="pm:ref">
<xsl:variable name="deliverableRef" select="pm:ref" />
<xsl:variable name="deliverable" select="alf:parseXMLDocument( $deliverableRef )" />
<p>
<xsl:if test="$deliverable">
<xsl:value-of select="$deliverable/pm:name" />
</xsl:if>
</p>
</xsl:if>
</xsl:template>
</xsl:stylesheet>
04-03-2007 11:40 PM
file:///C:/Alfresco/dummy.xsl; Line #0; Column #0; javax.xml.transform.Transform
erException: unable to create uri http://preview.admin.processmentor.www--sandbo
x.10-8-8-117.ip.alfrescodemo.net:8180/content/xml/deliverables/Application Model
.xml
file:///C:/Alfresco/dummy.xsl; Line #0; Column #0; java.lang.NullPointerException
04-04-2007 10:16 AM
04-05-2007 01:18 AM
<xsl:variable name="deliverableRef" select="replace(pm:ref,' ','%20')" />
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.