cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From icewind <icewi...@yahoo.com>
Subject truncated text using xinclude with xpointer expression
Date Fri, 10 Dec 2004 14:03:52 GMT
Hi,

I'm seeing text truncated when I'm using an xinclude
tag with a href that includes an xpointer expression.

More details.

At a point in my pipeline, I have the following xml
(call it XML-ENTRIES):

<entries>
<entry>
<xi:include
href="cocoon:///files/file1/title#xpointer(/extract/titleproper/text())"

</entry>

<entry>
<xi:include
href="cocoon:///files/file2/title#xpointer(/extract/titleproper/text())"

</entry>

<entry>
<xi:include
href="cocoon:///files/file3/title#xpointer(/extract/titleproper/text())"

</entry>
...
</entries>

I have a separate pipeline that handles
/files/*/title. That pipeline correctly produces the
following xml:


  <?xml version="1.0" encoding="ISO-8859-1" ?> 
  <extract>
  <titleproper>Title of Extract Here</titleproper> 
  <publisher>some publisher name here</publisher> 
  <extent>some extent here</extent> 
  <abstract>blah blah blah blah blah.</abstract> 
  </extract>



Ok, so I have an extract xml snippet for each file and
a pipeline to return that XML to me. My objective for
XML-ENTRIES is to get XML that will list just text in
the title proper tag of each individual entry after
passing XML-ENTRIES through the xinclude transformer.
However, what actually seems to be happening is that
the xinclude with the xpointer expression is pulling
out only some of the text in the titleproper tags. So,
if I send XML-ENTRIES through the xinclude transformer
I may get something like this:


<entries>
<entry>Title for Entry 1</entry>
<entry>Title fo</entry>
<entry>Title for Entr</entry>
</entries>

Note how the text is truncated in some of the <entry>
tags. Also note that I always request the
/files/*/title pipeline for file1, file2, or file3 and
never see the truncation so the problem is happening
in the xinclude transformer. I've notices that If I
change my xpointer expressions from

cocoon:///files/file2/title#xpointer(/extract/titleproper/text())


to 

cocoon:///files/file2/title#xpointer(/extract/titleproper)"

then I get the following XML that gives me all of the
text, but also includes the titleproper tags, which I
do not want. I just want the text.

<entries>
<entry><titleproper>Title for Entry
1</titleproper></entry>
<entry><titleproper>Title for Entry
2</titleproper></entry>
<entry><titleproper>Title for Entry
3</titleproper></entry>
</entries>
 

Is my xpointer expression incorrect? Is there a bug in
the parser? in the xinclude transformer?

My setup is java 1.4.2_02, Tomcat 5.0.x and Cocoon
2.1.6.

Any suggestions appreciated.




		
__________________________________ 
Do you Yahoo!? 
Yahoo! Mail - now with 250MB free storage. Learn more.
http://info.mail.yahoo.com/mail_250

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


Mime
View raw message