cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Charles Yates <ceya...@stanford.edu>
Subject Re: Failed to execute pipeline.: Errors in XSLT transformation
Date Tue, 01 Apr 2003 18:58:46 GMT
   Sorry I can't be much help here, but I will say that this Exception 
and your tale of woe does look vaguely familiar to me.  The voices of my 
memory are whispering 'namespaces'.   I find dealing with namespaces one 
of the more gnarly parts of xml, especially with SAX.  My suggestion is 
(and this is an almost complete shot in the dark) to define a namespace 
and prefix for your local elements.

Charles

Don Saxton wrote:

>Geoff
>
>this pipe works and results in the p1.xml attached.
>generate type="session-attr"
>serialize type="xml"
>result is p1.xml (attached)
>
>Yet this pipe does not generate type="session-attr"
>transform src="person.xsl"  (attached )
>serialize type="html" (never gets here)
>result is  this error
>
>Original exception : java.lang.RuntimeException: Errors in XSLT
>transformation:
>Fatal: java.lang.NullPointerException
>
>at
>org.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.java:3170)
>at
>org.apache.xalan.transformer.TransformerHandlerImpl.endDocument(TransformerH
>andlerImpl.java:433)
>at
>org.apache.cocoon.xml.AbstractXMLPipe.endDocument(AbstractXMLPipe.java:91)
>at
>org.apache.cocoon.transformation.TraxTransformer.endDocument(TraxTransformer
>.java:575)
>at
>org.apache.cocoon.generation.SessionAttributeGenerator.generate(SessionAttri
>buteGenerator.java:189)
>at
>org.apache.cocoon.components.pipeline.CachingEventPipeline.process(CachingEv
>entPipeline.java:250)
>at
>org.apache.cocoon.components.pipeline.CachingStreamPipeline.process(CachingS
>treamPipeline.java:395)
>
>Yet when I test the transform outside of cocoon,  the xsl is fine. And if
>other working xsl are substituted they will produce this same error.
>
>
>Don
>
>
>  
>
>>you may need to post your xsl.  it's unclear from what you say below -
>>if you comment out all transfomers, does the exception go away?
>>
>>Geoff
>>
>>    
>>
>>>-----Original Message-----
>>>From: Don Saxton [mailto:dsaxton@pacbell.net]
>>>Sent: Monday, March 31, 2003 9:22 PM
>>>To: cocoon-users@xml.apache.org
>>>Subject: Re: Failed to execute pipeline.: Errors in XSLT transformation
>>>
>>>
>>>Thanks Charles.
>>>I totally agree.  and that is why I am stumped. To be sure the request
>>>      
>>>
>is
>  
>
>>>filled beginning with a
>>>      <map:generate type="session-attr">
>>>which I   <map:serialize type="xml"/> and save the result as p1.xml.
>>>
>>>THEN I test several xsl (just to be sure) on p1.xml.  The xsl all
>>>pass both
>>>in xmlspy and xslerator.
>>>
>>>THEN removng the   <map:serialize type="xml"/> and replacing with
>>>one of the
>>>tested xsl,   <map:serialize type="xml"/> or   <map:serialize
>>>type="html"/>
>>>(whichever is appropriate to the xsl) Still resutl in the bad voodoo
>>>reported earlier.
>>>
>>>Incidentally looking at CachingStreamPipeline, I found the below
>>>javadoc on
>>>the class. Maybe if I switch cacheing off? how?
>>>
>>>The real blister is that I was so sure I was finished.
>>>
>>>Don
>>>
>>> * This stream pipeline is able to cache the response, if
>>> * <ul>
>>> *  <li>a) the serializer is cacheable</li>
>>> *  <li>b) the <code>EventPipeline</code> is cacheable</li>
>>> *  </ul>
>>> *
>>>
>>>----- Original Message -----
>>>From: "Charles Yates" <ceyates@stanford.edu>
>>>To: <cocoon-users@xml.apache.org>
>>>Sent: Monday, March 31, 2003 4:24 PM
>>>Subject: Re: Failed to execute pipeline.: Errors in XSLT transformation
>>>
>>>
>>>      
>>>
>>>>In cases like this I do the following:
>>>>
>>>>1) make sure the pipeline is giving the transformer in question the
>>>>right input. (ie comment out the transformer and any subsequent ones
>>>>        
>>>>
>and
>  
>
>>>>use XMLSerializer)
>>>>2) make sure the stylesheet works outside of cocoon. (you can do step
>>>>one to get the appropriate input)
>>>>
>>>>Charles
>>>>
>>>>Don Saxton wrote:
>>>>
>>>>        
>>>>
>>>>>I have tried several xsl and after double checking each of them  I
>>>>>          
>>>>>
>am
>  
>
>>>>>stumped.
>>>>>
>>>>>I found several zarros in  bugzilla. In mail list I have seen
>>>>>          
>>>>>
>several
>  
>
>>>>>"Failed to execute pipeline"  and a couple related to NPE, but none
>>>>>linking either to "Errors in XSLT".  Worse these other msgs don't
>>>>>indicate what solved the their problems.
>>>>>
>>>>>I am running 2.04 on w2k and I sure could use a clue.  All classes
>>>>>immediately surrounding the error are all cocoon. I have been
>>>>>studiously avoiding 2.1 beta chaos. Is it now time to dive in?  will
>>>>>that help?
>>>>>
>>>>>Don
>>>>>
>>>>>
>>>>>org.apache.cocoon.ProcessingException: Failed to execute pipeline.:
>>>>>java.lang.RuntimeException: Errors in XSLT transformation:
>>>>>Fatal: java.lang.NullPointerException
>>>>>
>>>>>
>>>>> at
>>>>>
>>>>>          
>>>>>
>>>org.apache.cocoon.components.pipeline.CachingStreamPipeline.proces
>>>s(CachingS
>>>treamPipeline.java:410)
>>>      
>>>
>>>>>          
>>>>>
>>>>
>>>>
>>>>---------------------------------------------------------------------
>>>>To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
>>>>For additional commands, e-mail: cocoon-users-help@xml.apache.org
>>>>
>>>>        
>>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
>>>For additional commands, e-mail: cocoon-users-help@xml.apache.org
>>>
>>>
>>>
>>>      
>>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
>>For additional commands, e-mail: cocoon-users-help@xml.apache.org
>>
>>    
>>
>>------------------------------------------------------------------------
>>
>><?xml version="1.0" encoding="UTF-8"?>
>><envelope chiba:css-style="style.css" chiba:id="person" chiba:name="Person Form"
xlink:href="forms/person.xml" xmlns:chiba="http://chiba.sourceforge.net/2001/09/xforms" xmlns:xforms="http://www.w3.org/2002/08/xforms/cr"
xmlns:xlink="http://www.w3.org/1999/xlink"><xforms:model xforms:id="model_0"><xforms:instance
xforms:href="http://graphicresponsemedia.net:8080/family/xmldb/family/?person=p5" xforms:id="instance_0"><person
born="March 19, 1949" id="p1" name="Donald Eugene Saxton" src:col="/db/family" src:key="album.xml"
xmlns:collection="http://apache.org/cocoon/xmldb/1.0" xmlns:src="http://xml.apache.org/xindice/Query">
>>			<parents>
>>				<personref person="p2"/>
>>				<personref person="p7"/>
>>			</parents>
>>			<siblings>
>>				<personref person="p5">Steven Edward</personref>
>>				<personref person="p6">Robert Andrew</personref>
>>			</siblings>
>>			<marriage begin="1987" end="1993">
>>				<personref person="p0">Frances</personref>
>>			</marriage>
>>			<children>
>>				<personref person="p3">Deirdre Astrid</personref>
>>				<personref person="p4">Austin Warner</personref>
>>			</children>
>>			<description>just a simple guy.
>>		</description>
>>			<documentref ref="p1"/>
>>		</person></xforms:instance><xforms:bind xforms:id="bind_0" xforms:nodeset="/person"><xforms:bind
xforms:id="bind_1" xforms:nodeset="@name" xforms:required="true()" xforms:type="string"/><xforms:bind
xforms:id="bind_2" xforms:minOccurs="0" xforms:nodeset="@born" xforms:required="false()" xforms:type="string"/><xforms:bind
xforms:id="bind_3" xforms:minOccurs="0" xforms:nodeset="@died" xforms:required="false()" xforms:type="string"/><xforms:bind
xforms:id="bind_4" xforms:minOccurs="0" xforms:nodeset="@gen" xforms:required="false()" xforms:type="string"/><xforms:bind
xforms:id="bind_5" xforms:nodeset="@id" xforms:required="true()" xforms:type="ID"/><xforms:bind
xforms:id="bind_6" xforms:nodeset="parents"><xforms:bind xforms:id="bind_7" xforms:nodeset="personref"><xforms:bind
xforms:id="bind_8" xforms:minOccurs="0" xforms:nodeset="@person" xforms:required="false()"
xforms:type="IDREF"/></xforms:bind></xforms:bind><xforms:bind xforms:id="bind_9"
xforms:nodeset="siblings"><xforms:bind xforms:id="bind_10" xforms:nodeset="personref"><xforms:bind
xforms:id="bind_11" xforms:minOccurs="0" xforms:nodeset="@person" xforms:required="false()"
xforms:type="IDREF"/></xforms:bind></xforms:bind><xforms:bind xforms:id="bind_12"
xforms:nodeset="marriage"><xforms:bind xforms:id="bind_13" xforms:minOccurs="0" xforms:nodeset="@end"
xforms:required="false()" xforms:type="string"/><xforms:bind xforms:id="bind_14" xforms:nodeset="@begin"
xforms:required="true()" xforms:type="string"/><xforms:bind xforms:id="bind_15" xforms:nodeset="personref"><xforms:bind
xforms:id="bind_16" xforms:minOccurs="0" xforms:nodeset="@person" xforms:required="false()"
xforms:type="IDREF"/></xforms:bind></xforms:bind><xforms:bind xforms:id="bind_17"
xforms:nodeset="children"><xforms:bind xforms:id="bind_18" xforms:nodeset="personref"><xforms:bind
xforms:id="bind_19" xforms:minOccurs="0" xforms:nodeset="@person" xforms:required="false()"
xforms:type="IDREF"/></xforms:bind></xforms:bind><xforms:bind xforms:id="bind_20"
xforms:nodeset="description"/><xforms:bind xforms:id="bind_21" xforms:nodeset="documentref"><xforms:bind
xforms:id="bind_22" xforms:nodeset="@ref" xforms:required="true()" xforms:type="IDREF"/></xforms:bind></xforms:bind><xforms:submission
xforms:action="cocoon:something" xforms:id="submission_0" xforms:method="post"/></xforms:model><body
bgcolor="#eeffee"><chiba:form><xforms:group xforms:id="group_0"><xforms:label
xforms:id="label_0">Person Edit</xforms:label><xforms:input chiba:enabled="true"
chiba:name="chiba:model[model_0]/person[1]/@name" chiba:required="true" xforms:bind="bind_1"
xforms:id="input_0"><xforms:label xforms:id="label_1">Name</xforms:label><xforms:alert
xforms:id="alert_0">Please provide a valid value for 'Name'. 'Name' is a required 'String'
value.</xforms:alert><xforms:value>Donald Eugene Saxton</xforms:value></xforms:input><br/><xforms:input
chiba:enabled="true" chiba:name="chiba:model[model_0]/person[1]/@born" chiba:required="false"
xforms:bind="bind_2" xforms:id="input_1"><xforms:label xforms:id="label_2">Born</xforms:label><xforms:alert
xforms:id="alert_1">Please provide a valid value for 'Born'. 'Born' is an optional 'String'
value.</xforms:alert><xforms:value>March 19, 1949</xforms:value></xforms:input><xforms:input
chiba:enabled="true" chiba:required="false" xforms:bind="bind_3" xforms:id="input_2"><xforms:label
xforms:id="label_3">Died</xforms:label><xforms:alert xforms:id="alert_2">Please
provide a valid value for 'Died'. 'Died' is an optional 'String' value.</xforms:alert></xforms:input><xforms:input
chiba:enabled="true" chiba:required="false" xforms:bind="bind_4" xforms:id="input_3"><xforms:label
xforms:id="label_4">Gen</xforms:label><xforms:alert xforms:id="alert_3">Please
provide a valid value for 'Gen'. 'Gen' is an optional 'String' value.</xforms:alert></xforms:input><xforms:input
chiba:enabled="true" chiba:name="chiba:model[model_0]/person[1]/@id" chiba:required="true"
xforms:bind="bind_5" xforms:id="input_4"><xforms:label xforms:id="label_5">Id</xforms:label><xforms:alert
xforms:id="alert_4">Please provide a valid value for 'Id'. 'Id' is a required 'Id' value.</xforms:alert><xforms:value>p1</xforms:value></xforms:input><xforms:group
xforms:id="group_1"><xforms:label xforms:id="label_6">Parents</xforms:label><xforms:trigger
xforms:id="trigger_0"><xforms:label xlink:href="images/add_new.gif">Insert after
selected</xforms:label><xforms:hint>inserts a new entry in this collection</xforms:hint><xforms:action
xforms:id="action_0"><xforms:insert chiba:enabled="true" xforms:at="xforms:index('repeat_0')"
xforms:bind="bind_7" xforms:id="insert_0" xforms:position="after"/></xforms:action></xforms:trigger><xforms:trigger
xforms:id="trigger_1"><xforms:label xlink:href="images/delete.gif">Delete selected</xforms:label><xforms:hint>deletes
selected entry from this collection</xforms:hint><xforms:action xforms:id="action_1"><xforms:delete
chiba:enabled="true" xforms:at="xforms:index('repeat_0')" xforms:bind="bind_7" xforms:id="delete_0"/></xforms:action></xforms:trigger><xforms:repeat
chiba:enabled="true" chiba:index="1" chiba:name="/repeat_0" xforms:bind="bind_7" xforms:id="repeat_0"><xforms:group
chiba:position="1" chiba:transient="true"><xforms:extension><chiba:selector/></xforms:extension><xforms:group
xforms:id="group_2#0"><xforms:label xforms:id="label_7#1">Personref</xforms:label><xforms:input
chiba:enabled="true" chiba:name="chiba:model[model_0]/person[1]/parents[1]/personref[1]/@person"
chiba:required="false" xforms:bind="bind_8" xforms:id="input_5#2"><xforms:label xforms:id="label_8#3">Person</xforms:label><xforms:alert
xforms:id="alert_5#4">Please provide a valid value for 'Person'. 'Person' is an optional
'Idref' value.</xforms:alert><xforms:value>p2</xforms:value></xforms:input></xforms:group></xforms:group><xforms:group
chiba:position="2" chiba:transient="true"><xforms:extension><chiba:selector/></xforms:extension><xforms:group
xforms:id="group_2#5"><xforms:label xforms:id="label_7#6">Personref</xforms:label><xforms:input
chiba:enabled="true" chiba:name="chiba:model[model_0]/person[1]/parents[1]/personref[2]/@person"
chiba:required="false" xforms:bind="bind_8" xforms:id="input_5#7"><xforms:label xforms:id="label_8#8">Person</xforms:label><xforms:alert
xforms:id="alert_5#9">Please provide a valid value for 'Person'. 'Person' is an optional
'Idref' value.</xforms:alert><xforms:value>p7</xforms:value></xforms:input></xforms:group></xforms:group></xforms:repeat></xforms:group><xforms:group
xforms:id="group_3"><xforms:label xforms:id="label_9">Siblings</xforms:label><xforms:trigger
xforms:id="trigger_2"><xforms:label xlink:href="images/add_new.gif">Insert after
selected</xforms:label><xforms:hint>inserts a new entry in this collection</xforms:hint><xforms:action
xforms:id="action_2"><xforms:insert chiba:enabled="true" xforms:at="xforms:index('repeat_1')"
xforms:bind="bind_10" xforms:id="insert_1" xforms:position="after"/></xforms:action></xforms:trigger><xforms:trigger
xforms:id="trigger_3"><xforms:label xlink:href="images/delete.gif">Delete selected</xforms:label><xforms:hint>deletes
selected entry from this collection</xforms:hint><xforms:action xforms:id="action_3"><xforms:delete
chiba:enabled="true" xforms:at="xforms:index('repeat_1')" xforms:bind="bind_10" xforms:id="delete_1"/></xforms:action></xforms:trigger><xforms:repeat
chiba:enabled="true" chiba:index="1" chiba:name="/repeat_1" xforms:bind="bind_10" xforms:id="repeat_1"><xforms:group
chiba:position="1" chiba:transient="true"><xforms:extension><chiba:selector/></xforms:extension><xforms:group
xforms:id="group_4#a"><xforms:label xforms:id="label_10#b">Personref</xforms:label><xforms:input
chiba:enabled="true" chiba:name="chiba:model[model_0]/person[1]/siblings[1]/personref[1]/@person"
chiba:required="false" xforms:bind="bind_11" xforms:id="input_6#c"><xforms:label xforms:id="label_11#d">Person</xforms:label><xforms:alert
xforms:id="alert_6#e">Please provide a valid value for 'Person'. 'Person' is an optional
'Idref' value.</xforms:alert><xforms:value>p5</xforms:value></xforms:input></xforms:group></xforms:group><xforms:group
chiba:position="2" chiba:transient="true"><xforms:extension><chiba:selector/></xforms:extension><xforms:group
xforms:id="group_4#f"><xforms:label xforms:id="label_10#10">Personref</xforms:label><xforms:input
chiba:enabled="true" chiba:name="chiba:model[model_0]/person[1]/siblings[1]/personref[2]/@person"
chiba:required="false" xforms:bind="bind_11" xforms:id="input_6#11"><xforms:label xforms:id="label_11#12">Person</xforms:label><xforms:alert
xforms:id="alert_6#13">Please provide a valid value for 'Person'. 'Person' is an optional
'Idref' value.</xforms:alert><xforms:value>p6</xforms:value></xforms:input></xforms:group></xforms:group></xforms:repeat></xforms:group><xforms:group
xforms:id="group_5"><xforms:label xforms:id="label_12">Marriage</xforms:label><xforms:trigger
xforms:id="trigger_4"><xforms:label xlink:href="images/add_new.gif">Insert after
selected</xforms:label><xforms:hint>inserts a new entry in this collection</xforms:hint><xforms:action
xforms:id="action_4"><xforms:insert chiba:enabled="true" xforms:at="xforms:index('repeat_2')"
xforms:bind="bind_12" xforms:id="insert_2" xforms:position="after"/></xforms:action></xforms:trigger><xforms:trigger
xforms:id="trigger_5"><xforms:label xlink:href="images/delete.gif">Delete selected</xforms:label><xforms:hint>deletes
selected entry from this collection</xforms:hint><xforms:action xforms:id="action_5"><xforms:delete
chiba:enabled="true" xforms:at="xforms:index('repeat_2')" xforms:bind="bind_12" xforms:id="delete_2"/></xforms:action></xforms:trigger><xforms:repeat
chiba:enabled="true" chiba:index="1" chiba:name="/repeat_2" xforms:bind="bind_12" xforms:id="repeat_2"><xforms:group
chiba:position="1" chiba:transient="true"><xforms:group xforms:id="group_6#14"><xforms:extension><chiba:selector/></xforms:extension><xforms:input
chiba:enabled="true" chiba:name="chiba:model[model_0]/person[1]/marriage[1]/@end" chiba:required="false"
xforms:bind="bind_13" xforms:id="input_7#15"><xforms:label xforms:id="label_13#16">End</xforms:label><xforms:alert
xforms:id="alert_7#17">Please provide a valid value for 'End'. 'End' is an optional 'String'
value.</xforms:alert><xforms:value>1993</xforms:value></xforms:input><xforms:input
chiba:enabled="true" chiba:name="chiba:model[model_0]/person[1]/marriage[1]/@begin" chiba:required="true"
xforms:bind="bind_14" xforms:id="input_8#18"><xforms:label xforms:id="label_14#19">Begin</xforms:label><xforms:alert
xforms:id="alert_8#1a">Please provide a valid value for 'Begin'. 'Begin' is a required
'String' value.</xforms:alert><xforms:value>1987</xforms:value></xforms:input><xforms:label
xforms:id="label_15#1b">Personref</xforms:label><xforms:input chiba:enabled="true"
chiba:required="false" xforms:bind="bind_16" xforms:id="input_9#1c"><xforms:label xforms:id="label_16#1d">Person</xforms:label><xforms:alert
xforms:id="alert_9#1e">Please provide a valid value for 'Person'. 'Person' is an optional
'Idref' value.</xforms:alert></xforms:input></xforms:group></xforms:group></xforms:repeat></xforms:group><xforms:group
xforms:id="group_7"><xforms:label xforms:id="label_17">Children</xforms:label><xforms:trigger
xforms:id="trigger_8"><xforms:label xlink:href="images/add_new.gif">Insert after
selected</xforms:label><xforms:hint>inserts a new entry in this collection</xforms:hint><xforms:action
xforms:id="action_8"><xforms:insert chiba:enabled="true" xforms:at="xforms:index('repeat_4')"
xforms:bind="bind_18" xforms:id="insert_4" xforms:position="after"/></xforms:action></xforms:trigger><xforms:trigger
xforms:id="trigger_9"><xforms:label xlink:href="images/delete.gif">Delete selected</xforms:label><xforms:hint>deletes
selected entry from this collection</xforms:hint><xforms:action xforms:id="action_9"><xforms:delete
chiba:enabled="true" xforms:at="xforms:index('repeat_4')" xforms:bind="bind_18" xforms:id="delete_4"/></xforms:action></xforms:trigger><xforms:repeat
chiba:enabled="true" chiba:index="1" chiba:name="/repeat_4" xforms:bind="bind_18" xforms:id="repeat_4"><xforms:group
chiba:position="1" chiba:transient="true"><xforms:extension><chiba:selector/></xforms:extension><xforms:group
xforms:id="group_8#1f"><xforms:label xforms:id="label_18#20">Personref</xforms:label><xforms:input
chiba:enabled="true" chiba:name="chiba:model[model_0]/person[1]/children[1]/personref[1]/@person"
chiba:required="false" xforms:bind="bind_19" xforms:id="input_10#21"><xforms:label xforms:id="label_19#22">Person</xforms:label><xforms:alert
xforms:id="alert_10#23">Please provide a valid value for 'Person'. 'Person' is an optional
'Idref' value.</xforms:alert><xforms:value>p3</xforms:value></xforms:input></xforms:group></xforms:group><xforms:group
chiba:position="2" chiba:transient="true"><xforms:extension><chiba:selector/></xforms:extension><xforms:group
xforms:id="group_8#24"><xforms:label xforms:id="label_18#25">Personref</xforms:label><xforms:input
chiba:enabled="true" chiba:name="chiba:model[model_0]/person[1]/children[1]/personref[2]/@person"
chiba:required="false" xforms:bind="bind_19" xforms:id="input_10#26"><xforms:label xforms:id="label_19#27">Person</xforms:label><xforms:alert
xforms:id="alert_10#28">Please provide a valid value for 'Person'. 'Person' is an optional
'Idref' value.</xforms:alert><xforms:value>p4</xforms:value></xforms:input></xforms:group></xforms:group></xforms:repeat></xforms:group><xforms:group
xforms:id="group_9"><xforms:label xforms:id="label_20">Description</xforms:label></xforms:group><xforms:group
xforms:id="group_10"><xforms:label xforms:id="label_21">Documentref</xforms:label><xforms:trigger
xforms:id="trigger_10"><xforms:label xlink:href="images/add_new.gif">Insert after
selected</xforms:label><xforms:hint>inserts a new entry in this collection</xforms:hint><xforms:action
xforms:id="action_10"><xforms:insert chiba:enabled="true" xforms:at="xforms:index('repeat_5')"
xforms:bind="bind_21" xforms:id="insert_5" xforms:position="after"/></xforms:action></xforms:trigger><xforms:trigger
xforms:id="trigger_11"><xforms:label xlink:href="images/delete.gif">Delete selected</xforms:label><xforms:hint>deletes
selected entry from this collection</xforms:hint><xforms:action xforms:id="action_11"><xforms:delete
chiba:enabled="true" xforms:at="xforms:index('repeat_5')" xforms:bind="bind_21" xforms:id="delete_5"/></xforms:action></xforms:trigger><xforms:repeat
chiba:enabled="true" chiba:index="1" chiba:name="/repeat_5" xforms:bind="bind_21" xforms:id="repeat_5"><xforms:group
chiba:position="1" chiba:transient="true"><xforms:extension><chiba:selector/></xforms:extension><xforms:input
chiba:enabled="true" chiba:name="chiba:model[model_0]/person[1]/documentref[1]/@ref" chiba:required="true"
xforms:bind="bind_22" xforms:id="input_11#29"><xforms:label xforms:id="label_22#2a">Ref</xforms:label><xforms:alert
xforms:id="alert_11#2b">Please provide a valid value for 'Ref'. 'Ref' is a required 'Idref'
value.</xforms:alert><xforms:value>p1</xforms:value></xforms:input></xforms:group></xforms:repeat></xforms:group></xforms:group><xforms:submit
xforms:id="submit_0" xforms:submission="submission_0"><xforms:label xforms:id="label_23">Submit</xforms:label></xforms:submit></chiba:form></body></envelope>
>>
>>------------------------------------------------------------------------
>>
>><?xml version="1.0" encoding="UTF-8"?>
>><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
>>
>>
>><xsl:template match="/">
>>		<HTML>
>>			<HEAD>
>>	<TITLE>Title</TITLE>
>>	</HEAD>
>>	<BODY>
>>
>> 
>><xsl:for-each select="//person">
>>	<h3><xsl:value-of select="@name"/></h3>
>>
>>        <i>(id=<xsl:value-of select="@id"/>) <a href="edit/person/{@id}">
edit </a></i>
>>
>>	<table border="1" cellspacing="0">
>>        <tr><td>born</td><td> <xsl:value-of select="@born"/>
</td>
>>
>>        </tr><tr><td> parents 
>>	</td><td><xsl:for-each select="parents/personref">
>>		<li><a>
>>		  <xsl:attribute name="href">?person=<xsl:value-of select="@person"/></xsl:attribute>
>>		  <xsl:value-of select="@person"/> 
>>		 </a> <xsl:value-of select="text()"/></li>
>>	</xsl:for-each> </td></tr>
>>
>>        <tr><td>marriage <xsl:value-of select="marriage/@begin"/>
to <xsl:value-of select="marriage/@end"/></td><td>
>>        <xsl:for-each select="marriage/personref">
>>		<li><a>
>>		  <xsl:attribute name="href">?person=<xsl:value-of select="@person"/></xsl:attribute>
>>		  <xsl:value-of select="@person"/> 
>>		 </a></li>
>>	</xsl:for-each> </td></tr>
>>
>>        <tr><td>siblings</td><td>
>>        <xsl:for-each select="siblings/personref">
>>		<li><a>
>>		  <xsl:attribute name="href">?person=<xsl:value-of select="@person"/>
</xsl:attribute>
>>		  <xsl:value-of select="@person"/> 
>>		 </a> <xsl:value-of select="text()"/></li>
>>	</xsl:for-each> </td></tr>
>>
>>        <xsl:if test="not(0=count(children/personref))">
>>        <tr><td>children</td><td>
>>        <xsl:for-each select="children/personref">
>>		<li><a>
>>		  <xsl:attribute name="href">?person=<xsl:value-of select="@person"/></xsl:attribute>
>>		  <xsl:value-of select="@person"/> 
>>		 </a> <xsl:value-of select="text()"/></li>
>>	</xsl:for-each> </td></tr>
>>        </xsl:if>
>>        <tr><td>description</td><td>
>><xsl:value-of select="description"/></td></tr>
>>	
>><tr><td>documents</td><td>
>>        <xsl:for-each select="documentref">
>>		
>>		<li><a>
>>		  <xsl:attribute name="href">?document=<xsl:value-of select="@ref"/></xsl:attribute>
>>                <xsl:value-of select="@ref"/>
>>		 </a></li>
>>	</xsl:for-each></td></tr>
>></table>
>>		<div align="center"><a href="?list=persons">Back to List</a> </div>
>>
>></xsl:for-each>
>><b>I need some way to resolve idrefs i.e. get the person's name instead of the
id.What is showing here is the text node of the ref element only if it is present.</b>
>></BODY>
>></HTML>
>></xsl:template >
>></xsl:stylesheet
>>
>>>------------------------------------------------------------------------
>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
>>>For additional commands, e-mail: cocoon-users-help@xml.apache.org
>>>



---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org


Mime
View raw message