We are actually seeing this in more than one case, I think. I've just managed to track down the exact debug statement that is causing the anomalous behavior in the first case we found.
There is no exception being thrown, and I haven't tracked down exactly how things are different, but our application behaves differently in both cases without throwing an exception.
The pipeline is attached. The only debug in the pipeline right now causes the app to behave as we except. If I take out that debug, I get different behavior. This pipeline is the xforms xpl for a page -- i.e. <page id="editTimesheetID"
path-info="/editTimesheet(.*)"
matcher="oxf/processor/perl5-matcher"
xforms="oxf:/app/xforms/edit/editTimesheetXForm.xpl" .../>
If it helps to download and execute it yourself, let me know. I have download stuff ready.
-calvin
calvin smith wrote:
I am running into an error where I see different behavior depending on whether there are debugs in my xpl files or not.
Hi Calvin,
There is 90% chance that this is an incorrect behavior. In most cases, when you see exceptions after removing a debug, it is because a processor is generating faulty SAX events. When you have a debug after the output of that processor, OXF internally creates a dom4j document. The dom4j library is quite forgiving and in most cases will create a valid document even if the SAX events are faulty, and then regenerate correct SAX events. Without the "debug", the events will go directly to the next processor, which might not be as forgiving (for instance Xalan will typically throw NPEs).
But we'll need to see your specific case to tell for sure. Can you please send us more info, like the exception, and if possible the pipeline in which this is happening?
Alex
_______________________________________________ oxf-users mailing list [EMAIL PROTECTED] http://mail.orbeon.com/mailman/listinfo/oxf-users
<?xml version="1.0" encoding="UTF-8"?> <!-- $Id: editTimesheetXForm.xpl,v 1.12 2003/10/23 19:14:22 calvins Exp $ --> <p:config xmlns:p="http://www.orbeon.com/oxf/pipeline" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <p:param type="input" name="instance"/> <p:param type="output" name="data" debug="editTimesheetXForm#param:output:data"/>
<!-- get requested uri in order to parse out timesheet ID -->
<p:processor uri="oxf/processor/request">
<p:input name="config">
<config>
<include>/request/request-uri</include>
</config>
</p:input>
<p:output name="data" id="request"/>
</p:processor>
<p:processor uri="oxf/processor/pipeline">
<p:input name="config" href="oxf:/app/pipelines/getApplicationRole.xpl"/>
<p:output name="data" id="role"/>
</p:processor>
<p:processor uri="oxf/processor/xslt">
<p:input name="data" href="aggregate('root', #request, #role, oxf:/app/config/application.xml#xpointer(/Configuration/RoleStateMappingList) )"/>
<p:input name="config">
<xsl:stylesheet exclude-result-prefixes="p" version="1.0">
<xsl:template match="/root/request/request-uri">
<xsl:variable name="role" select="/root/TTRole/request-security/role[last()]"/>
<config>
<xsl:if test="/root/TTRole/User/EmployeeID">
<EmployeeIDList>
<xsl:copy-of select="/root/TTRole/User/EmployeeID"/>
</EmployeeIDList>
</xsl:if>
<TimesheetIDList>
<TimesheetID>
<xsl:value-of select="substring-after(.,'editTimesheet/')"/>
</TimesheetID>
</TimesheetIDList>
<xsl:copy-of select="/root/RoleStateMappingList/RoleStateMapping[Role=$role]/StateIDList"/>
</config>
</xsl:template>
</xsl:stylesheet>
</p:input>
<p:output name="data" id="filterconfig"/>
</p:processor>
<!-- Call a sub-pipeline for getting the timesheet instance from the database. -->
<p:processor uri="oxf/processor/pipeline">
<p:input name="config" href="oxf:/app/pipelines/filterTimesheets.xpl"/>
<p:input name="filterconfig" href="#filterconfig" debug="editTimesheetXForm#pipeline:input:#filterconfig"/>
<p:output name="data" id="dbresponse"/>
</p:processor>
<!-- build the configuration for the date processor -->
<p:processor uri="oxf/processor/xslt">
<p:input name="data" href="#dbresponse"/>
<p:input name="config">
<xsl:stylesheet version="1.0" exclude-result-prefixes="p">
<xsl:template match="Timesheet/Period">
<config>
<StartDate>
<xsl:value-of select="Start"/>
</StartDate>
<EndDate>
<xsl:value-of select="End"/>
</EndDate>
</config>
</xsl:template>
</xsl:stylesheet>
</p:input>
<p:output name="data" id="date-config"/>
</p:processor>
<!-- using the above date-config, ask the date processor for a DateList -->
<p:processor uri="cde/processor/date">
<p:input name="config" href="#date-config"/>
<p:output name="data" id="datelist"/>
</p:processor>
<!-- get full list of projects -->
<p:processor uri="oxf/processor/xslt">
<p:input name="data" href="oxf:/app/schemas/ProjectEnumerations.xsd"/>
<p:input name="config">
<xsl:stylesheet xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:enum="urn:publicid:cde.berkeley.edu:platform:enumerations" version="1.0" exclude-result-prefixes="p xs enum">
<xsl:template match="/xs:schema/xs:simpleType/xs:restriction">
<ProjectList>
<xsl:for-each select="xs:enumeration">
<Project>
<ID>
<xsl:value-of select="@value"/>
</ID>
<Label>
<xsl:value-of select="xs:annotation/xs:appinfo/enum:Label"/>
</Label>
</Project>
</xsl:for-each>
</ProjectList>
</xsl:template>
</xsl:stylesheet>
</p:input>
<p:output name="data" id="projectlist"/>
<!-- debug="editTimesheetXForm:xslt:projectlist"-->
</p:processor>
<!-- check for database success when retrieving timesheet -->
<p:choose href="#dbresponse">
<p:when test="not(/Response/@success='false')">
<!-- build the XForms model -->
<p:processor uri="oxf/processor/xslt">
<p:input name="data" href="aggregate('ProjectsAndDatesAndTimesheet',#datelist,#projectlist,#dbresponse)"/>
<p:input name="config">
<xsl:stylesheet version="1.0" exclude-result-prefixes="p">
<xsl:key name="TimesheetEntryByProjectKey" match="TimesheetEntry" use="Project"/>
<xsl:template match="/">
<root>
<ID>
<xsl:value-of select="/ProjectsAndDatesAndTimesheet/RecordSet/record/documentID"/>
</ID>
<Matrix>
<xsl:for-each select="/ProjectsAndDatesAndTimesheet/ProjectList/Project">
<xsl:variable name="projID" select="ID"/>
<Project id="{ID}" label="{Label}">
<xsl:for-each select="/ProjectsAndDatesAndTimesheet/DateList/Date">
<xsl:variable name="date" select="."/>
<Time date="{.}">
<Hours>
<!-- Get a nodeset containing the TimesheetEntry elements that match the current project and the current date -->
<xsl:variable name="entries" select="key('TimesheetEntryByProjectKey',$projID)[Date=$date]"/>
<!-- If that nodeset is not empty -->
<xsl:if test="$entries">
<!-- Sum all of the Hours elements -->
<xsl:value-of select="sum($entries/Hours)"/>
</xsl:if>
<!-- Otherwise, return nothing, NOT 0 (null is different than 0 becuase we are building a sparse Timesheet representation) -->
</Hours>
</Time>
</xsl:for-each>
</Project>
</xsl:for-each>
</Matrix>
</root>
</xsl:template>
</xsl:stylesheet>
</p:input>
<p:output name="instance" id="trans-timesheet-data"/>
</p:processor>
</p:when>
<p:otherwise>
<!-- EVENTUALLY, WE'LL CALL THE ERROR PROCESSOR HERE -->
<p:processor uri="oxf/processor/identity">
<!--p:input name="data">
<ERROR>Error</ERROR>
</p:input-->
<p:input name="data" href="#dbresponse"/>
<p:output name="instance" id="trans-timesheet-data"/>
</p:processor>
</p:otherwise>
</p:choose>
<p:processor uri="oxf/processor/xslt">
<p:input name="data" href="#trans-timesheet-data"/>
<p:input name="config" href="oxf:/app/transforms/XFormsWrapper.xsl"/>
<p:output name="data" ref="data"/>
</p:processor>
</p:config>_______________________________________________ oxf-users mailing list [EMAIL PROTECTED] http://mail.orbeon.com/mailman/listinfo/oxf-users
