building cocoon fails (The requested operation cannot be performed on a file with a user-mapped section open)

2008-07-11 Thread Robby Pelssers
Hi list,

 

Anyone who encountered a similar problem?  And does anybody have an idea
how to fix this problem? Below are 2 build trials and it does not always
fail at the same spot.  I already googled on the error "The requested
operation cannot be performed on a file with a user-mapped section open"
and it looks like some kind of file locking issue.

 

Cheers,

Robby

 

---***--
----
---

 

cocoon-block-lucene-patch:

Processing:
D:\development\projects\core-1_3\cocoon-core\src\blocks\lucene\conf\luce
ne.xmap

Writing:
D:\development\projects\core-1_3\cocoon-core\build\webapp\sitemap.xmap

Processing:
D:\development\projects\core-1_3\cocoon-core\src\blocks\lucene\conf\luce
ne.xconf

Writing:
D:\development\projects\core-1_3\cocoon-core\build\webapp\WEB-INF\cocoon
.xconf

 

cocoon-block-mail-patch:

Processing:
D:\development\projects\core-1_3\cocoon-core\src\blocks\mail\conf\mailse
nder.xconf

Processing:
D:\development\projects\core-1_3\cocoon-core\src\blocks\mail\conf\sendma
il_xsl.xconf

Writing:
D:\development\projects\core-1_3\cocoon-core\build\webapp\WEB-INF\cocoon
.xconf

 

cocoon-block-profiler-patch:

Processing:
D:\development\projects\core-1_3\cocoon-core\src\blocks\profiler\conf\pr
ofiler.component.xmap

Processing:
D:\development\projects\core-1_3\cocoon-core\src\blocks\profiler\conf\pr
ofiler.xmap

Writing:
D:\development\projects\core-1_3\cocoon-core\build\webapp\sitemap.xmap

Processing:
D:\development\projects\core-1_3\cocoon-core\src\blocks\profiler\conf\pr
ofiler.xconf

Writing:
D:\development\projects\core-1_3\cocoon-core\build\webapp\WEB-INF\cocoon
.xconf

 

BUILD FAILED

D:\development\projects\core-1_3\cocoon-core\tools\targets\webapp-build.
xml:113: The following error occurred while executing this line:

D:\development\projects\core-1_3\cocoon-core\build\cocoon\temp\blocks-bu
ild.xml:3197: The following error occurred while executing this line:

D:\development\projects\core-1_3\cocoon-core\build\cocoon\temp\blocks-bu
ild.xml:168: FileNotFoundException: java.io.FileNotFoundException:
D:\developmen

t\projects\core-1_3\cocoon-core\build\webapp\WEB-INF\cocoon.xconf (The
requested operation cannot be performed on a file with a user-mapped
section open

)

 

Total time: 1 minute 32 seconds

1

 

---***--
----
---

 

cocoon-block-lucene-patch:

Processing:
D:\development\projects\core-1_3\cocoon-core\src\blocks\lucene\conf\luce
ne.xmap

Writing:
D:\development\projects\core-1_3\cocoon-core\build\webapp\sitemap.xmap

Processing:
D:\development\projects\core-1_3\cocoon-core\src\blocks\lucene\conf\luce
ne.xconf

Writing:
D:\development\projects\core-1_3\cocoon-core\build\webapp\WEB-INF\cocoon
.xconf

 

cocoon-block-mail-patch:

Processing:
D:\development\projects\core-1_3\cocoon-core\src\blocks\mail\conf\mailse
nder.xconf

Processing:
D:\development\projects\core-1_3\cocoon-core\src\blocks\mail\conf\sendma
il_xsl.xconf

Writing:
D:\development\projects\core-1_3\cocoon-core\build\webapp\WEB-INF\cocoon
.xconf

 

cocoon-block-profiler-patch:

Processing:
D:\development\projects\core-1_3\cocoon-core\src\blocks\profiler\conf\pr
ofiler.component.xmap

Processing:
D:\development\projects\core-1_3\cocoon-core\src\blocks\profiler\conf\pr
ofiler.xmap

Writing:
D:\development\projects\core-1_3\cocoon-core\build\webapp\sitemap.xmap

Processing:
D:\development\projects\core-1_3\cocoon-core\src\blocks\profiler\conf\pr
ofiler.xconf

Writing:
D:\development\projects\core-1_3\cocoon-core\build\webapp\WEB-INF\cocoon
.xconf

 

BUILD FAILED

D:\development\projects\core-1_3\cocoon-core\tools\targets\webapp-build.
xml:113: The following error occurred while executing this line:

D:\development\projects\core-1_3\cocoon-core\build\cocoon\temp\blocks-bu
ild.xml:3197: The following error occurred while executing this line:

D:\development\projects\core-1_3\cocoon-core\build\cocoon\temp\blocks-bu
ild.xml:168: FileNotFoundException: java.io.FileNotFoundException:
D:\developmen

t\projects\core-1_3\cocoon-core\build\webapp\WEB-INF\cocoon.xconf (The
requested operation cannot be performed on a file with a user-mapped
section open

)

 

Total time: 1 minute 32 seconds

1

 

---***--
----
---

 



RE: building cocoon fails (The requested operation cannot be performed on a file with a user-mapped section open)

2008-07-11 Thread Robby Pelssers
I ran mvn with the -e switch and this time it builded ok Maybe it
went well because it took a little longer with debugging turned on so
the chance of a file getting locked twice was dramatically reduced. And
just in case you are wondering where maven comes in to the picture:

 

 



  org.codehaus.mojo

  exec-maven-plugin

  1.1

  



  cocoon-build

  

exec

  

  package

  

build



  war



  



...

  

 

 

Cheers,

Robby

 



From: Robby Pelssers [mailto:[EMAIL PROTECTED] 
Sent: vrijdag 11 juli 2008 9:30
To: users@cocoon.apache.org
Subject: building cocoon fails (The requested operation cannot be
performed on a file with a user-mapped section open)

 

Hi list,

 

Anyone who encountered a similar problem?  And does anybody have an idea
how to fix this problem? Below are 2 build trials and it does not always
fail at the same spot.  I already googled on the error "The requested
operation cannot be performed on a file with a user-mapped section open"
and it looks like some kind of file locking issue.

 

Cheers,

Robby

 

---***--
----
---

 

cocoon-block-lucene-patch:

Processing:
D:\development\projects\core-1_3\cocoon-core\src\blocks\lucene\conf\luce
ne.xmap

Writing:
D:\development\projects\core-1_3\cocoon-core\build\webapp\sitemap.xmap

Processing:
D:\development\projects\core-1_3\cocoon-core\src\blocks\lucene\conf\luce
ne.xconf

Writing:
D:\development\projects\core-1_3\cocoon-core\build\webapp\WEB-INF\cocoon
.xconf

 

cocoon-block-mail-patch:

Processing:
D:\development\projects\core-1_3\cocoon-core\src\blocks\mail\conf\mailse
nder.xconf

Processing:
D:\development\projects\core-1_3\cocoon-core\src\blocks\mail\conf\sendma
il_xsl.xconf

Writing:
D:\development\projects\core-1_3\cocoon-core\build\webapp\WEB-INF\cocoon
.xconf

 

cocoon-block-profiler-patch:

Processing:
D:\development\projects\core-1_3\cocoon-core\src\blocks\profiler\conf\pr
ofiler.component.xmap

Processing:
D:\development\projects\core-1_3\cocoon-core\src\blocks\profiler\conf\pr
ofiler.xmap

Writing:
D:\development\projects\core-1_3\cocoon-core\build\webapp\sitemap.xmap

Processing:
D:\development\projects\core-1_3\cocoon-core\src\blocks\profiler\conf\pr
ofiler.xconf

Writing:
D:\development\projects\core-1_3\cocoon-core\build\webapp\WEB-INF\cocoon
.xconf

 

BUILD FAILED

D:\development\projects\core-1_3\cocoon-core\tools\targets\webapp-build.
xml:113: The following error occurred while executing this line:

D:\development\projects\core-1_3\cocoon-core\build\cocoon\temp\blocks-bu
ild.xml:3197: The following error occurred while executing this line:

D:\development\projects\core-1_3\cocoon-core\build\cocoon\temp\blocks-bu
ild.xml:168: FileNotFoundException: java.io.FileNotFoundException:
D:\developmen

t\projects\core-1_3\cocoon-core\build\webapp\WEB-INF\cocoon.xconf (The
requested operation cannot be performed on a file with a user-mapped
section open

)

 

Total time: 1 minute 32 seconds

1

 

---***--
----
---

 

cocoon-block-lucene-patch:

Processing:
D:\development\projects\core-1_3\cocoon-core\src\blocks\lucene\conf\luce
ne.xmap

Writing:
D:\development\projects\core-1_3\cocoon-core\build\webapp\sitemap.xmap

Processing:
D:\development\projects\core-1_3\cocoon-core\src\blocks\lucene\conf\luce
ne.xconf

Writing:
D:\development\projects\core-1_3\cocoon-core\build\webapp\WEB-INF\cocoon
.xconf

 

cocoon-block-mail-patch:

Processing:
D:\development\projects\core-1_3\cocoon-core\src\blocks\mail\conf\mailse
nder.xconf

Processing:
D:\development\projects\core-1_3\cocoon-core\src\blocks\mail\conf\sendma
il_xsl.xconf

Writing:
D:\development\projects\core-1_3\cocoon-core\build\webapp\WEB-INF\cocoon
.xconf

 

cocoon-block-profiler-patch:

Processing:
D:\development\projects\core-1_3\cocoon-core\src\blocks\profiler\conf\pr
ofiler.component.xmap

Processing:
D:\development\projects\core-1_3\cocoon-core\src\blocks\profiler\conf\pr
ofiler.xmap

Writing:
D:\development\projects\core-1_3\cocoon-core\build\webapp\sitemap.xmap

Processing:
D:\development\projects\core-1_3\cocoon-core\src\blocks\profiler\conf\pr
ofiler.xconf

Writing:
D:\development\projects\core-1_3\cocoon-core\build\webapp\WEB-INF\cocoon
.xconf

 

BUILD FAILED

D:\development\projects\core-1_3\cocoon-core\tools\targets\webapp-build.
xml:113: The following error occurred while executing this line:

D:\development\projects\core-1_3\cocoon-core\build\cocoon\temp\blocks-bu
ild.xml:3197: The following error occurred while executing this line:

D:\development\projects\core-1_3\cocoon-core\

Re: CSVGenerator separators

2008-07-11 Thread Andy Stevens
2008/7/9 netBrackets <[EMAIL PROTECTED]>:
>  Is there any way to tell the CSVGenerator to use one or more contiguous 
> spaces as a seperator?  You can tell it to use a single space:
>
>  
> 
>
> 
> 
>  
>
> But then when there are contiguous spaces separating values, it increments 
> the field number for each space that it finds, e.g. if there are 28 spaces 
> between the first field and the second field you get:
>
> 
> G005
> OR
> G020
> G021
> 
>
>  I'd like it to increment the field number only by 1 for each set of 
> contigous spaces, so it would output the below instead:
>
> csv:record number="1">
> G005
> OR
> G020
> G021
> 
>
>
> Thanks,
> Jeff

I don't know if there's anything in the CSVGenerator that can do this,
but how about following the generator with an XSL transformer that
renumbers the fields?  So long as you're not expecting any gaps in the
fields after the contiguous spaces are taken into account, something
like








should do the trick.


Andy.
-- 
http://answers.polldaddy.com/poll/771503/  Cross-site scripting poll

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Help with tree widget

2008-07-11 Thread Ralph Rauscher
Hi Peter,

see below for a sample on how it works in 2.1.11 - might work as well on
2.2 or at least give you some pointers.

model:


http://apache.org/cocoon/forms/1.0#definition";>

  




  

 
importClass(Packages.org.apache.cocoon.forms.formmodel.tree.DefaultTreeModel);

  var node1 = new DefaultTreeModel.DefaultTreeNode("node 1")
  var node2 = new DefaultTreeModel.DefaultTreeNode("node 2")
  var root = new DefaultTreeModel.DefaultTreeNode("root")
  root.add("node1", node1);
  node1.add("node2", node2);
  var treeModel = new DefaultTreeModel(root);

  widget.setModel(treeModel);

  


  

   
template:


http://apache.org/cocoon/forms/1.0#template";
  xmlns:fi="http://apache.org/cocoon/forms/1.0#instance";
  xmlns:jx="http://apache.org/cocoon/templates/jx/1.0";
  xmlns:i18n="http://apache.org/cocoon/i18n/2.1";>

  

  
  

  


   

  
  
 


  
test
  

  


  function TreeAction(id, act, path) {
var elt = document.getElementById(id);
if (!elt) {
alert("Error: cannot find element with id '" + id + "'");
return;
}
var form = forms_getForm(elt);
var actInput = id + ":action";
var pathInput = id + ":path";
form[actInput].value = act
form[pathInput].value = path;
forms_submitForm(elt, id);
// Reset fields (this form may be reposted later when in Ajax mode)
form[actInput].value = "";
form[pathInput].value = "";
return false;
  }
  function TreeToggleCollapse(id, path) {
return TreeAction(id, "toggle-collapse", path);
  }

  function TreeToggleSelect(id, path) {
return TreeAction(id, "toggle-select", path);
  }




  Mine: 
  

  
${treeNode.node.data}
  

  

  
  
  


Flow:

cocoon.load("resource://org/apache/cocoon/forms/flow/javascript/Form.js");

function test()
{
  var documentURI = cocoon.parameters["documentURI"];
  //var sourceXml = loadDocument(documentURI);
  var definitionURI = cocoon.parameters["definitionURI"];
  var bindingURI = cocoon.parameters["bindingURI"];
  var saveURI = cocoon.parameters["saveURI"];

  var document = loadDocument(documentURI);

  var form = new Form(definitionURI);
  form.createBinding(bindingURI);
  form.load(document);

  form.showForm("test-display");

  form.save(document);
  saveDocument(document, saveURI);
  cocoon.sendPage("test-success");
}

function loadDocument(uri) {
  var parser = null;
  var source = null;
  var resolver = null;
  try {
parser =
cocoon.getComponent(Packages.org.apache.excalibur.xml.dom.DOMParser.ROLE);
resolver =
cocoon.getComponent(Packages.org.apache.cocoon.environment.SourceResolver.ROLE);
source = resolver.resolveURI(uri);
var is = new Packages.org.xml.sax.InputSource(source.getInputStream());
is.setSystemId(source.getURI());
return parser.parseDocument(is);
  }
  finally {
if (source != null)
  resolver.release(source);
cocoon.releaseComponent(parser);
cocoon.releaseComponent(resolver);
  }
}

function saveDocument(document, uri) {
var source = null;
var resolver = null;
var outputStream = null;
try {
resolver =
cocoon.getComponent(Packages.org.apache.cocoon.environment.SourceResolver.ROLE);
source = resolver.resolveURI(uri);

var tf =
Packages.javax.xml.transform.TransformerFactory.newInstance();

if (source instanceof
Packages.org.apache.excalibur.source.ModifiableSource
&&
tf.getFeature(Packages.javax.xml.transform.sax.SAXTransformerFactory.FEATURE))
{

outputStream = source.getOutputStream();
var transformerHandler = tf.newTransformerHandler();
var transformer = transformerHandler.getTransformer();
   
transformer.setOutputProperty(Packages.javax.xml.transform.OutputKeys.INDENT,
"true");
   
transformer.setOutputProperty(Packages.javax.xml.transform.OutputKeys.METHOD,
"xml");
transformerHandler.setResult(new
Packages.javax.xml.transform.stream.StreamResult(outputStream));

var streamer = new
Packages.org.apache.cocoon.xml.dom.DOMStreamer(transformerHandler);
streamer.stream(document);
} else {
throw new
Packages.org.apache.cocoon.ProcessingException("Cannot write to source "
+ uri);
}
} finally {
if (source != null)
resolver.release(source);
cocoon.releaseComponent(resolver);
if (outputStream != null) {
try {
outputStream.flush();
outputStream.close();
} catch (error) {
cocoon.log.error("Could not flush/close outputstream: "
+ error);
}
}
}
}


---

Get the URL of the originating client into XSLT

2008-07-11 Thread Kjetil Kjernsmo
Hi all,

I've been trying to figure out how to get the URL of the originating client, 
i.e. the URL that the end user has in his address bar when he gets the 
response. I want to have access to this URL in my XSLT, preferably through a 
param variable. I've been experimenting a bit, but I cannot find a single 
simple solution to this problem, I usually end up with the URL of the 
stylesheet, or a variation thereof, or some more speculative concatenation of 
things like hostname, port, and so on, which is fragile against changing 
conditions. 

Is there a simple way to do this?

Kind regards 

Kjetil Kjernsmo
-- 
Senior Knowledge Engineer
Direct: +47 6783 1136 | Mobile: +47 986 48 234
Email: [EMAIL PROTECTED]   
Web: http://www.computas.com/

|  SHARE YOUR KNOWLEDGE  |

Computas AS  Vollsveien 9, PO Box 482, N-1327 Lysaker | Phone:+47 6783 1000 | 
Fax:+47 6783 1001


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Get the URL of the originating client into XSLT

2008-07-11 Thread Jeroen Reijn

Kjetil,

have you tried using the request input module in your sitemap?

You should be able to get it with {request:serverName} or something similar.

Regards,

Jeroen

Kjetil Kjernsmo wrote:

Hi all,

I've been trying to figure out how to get the URL of the originating client, 
i.e. the URL that the end user has in his address bar when he gets the 
response. I want to have access to this URL in my XSLT, preferably through a 
param variable. I've been experimenting a bit, but I cannot find a single 
simple solution to this problem, I usually end up with the URL of the 
stylesheet, or a variation thereof, or some more speculative concatenation of 
things like hostname, port, and so on, which is fragile against changing 
conditions. 


Is there a simple way to do this?

Kind regards 


Kjetil Kjernsmo


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Can't match elements with colons

2008-07-11 Thread Jeff Schmitz

Hello,
   I'm trying to take the output of the CSVGenerator and transform  
it.  However, my xslt will not match any of the elements that have  
colons in them.


e.g. for the following xml generated by CSVGenerator:

http://apache.org/cocoon/include/1.0 
">

  http://apache.org/cocoon/csv/1.0";>

System
Pump and Valve System



The following xslt will not find a match:

http://www.w3.org/1999/XSL/Transform";
xmlns:csv="http://apache.org/cocoon/csv/1.0#"; version="2.0">


  
	  








I can match the "relex" and the "systems" tags just fine, but neither  
of the ones with colons in them.  I've tried several variations on the  
template match (e.g. match=//csv:record, etc).  any ideas?


Thanks,
Jeff


Re: CSVGenerator separators

2008-07-11 Thread Jeff Schmitz
I'll give it a try as soon as I can figure out how to match element  
names that have a colon in them.  As it is, the following will never  
match anything:


   


On Jul 11, 2008, at 7:30 AM, Andy Stevens wrote:


2008/7/9 netBrackets <[EMAIL PROTECTED]>:
Is there any way to tell the CSVGenerator to use one or more  
contiguous spaces as a seperator?  You can tell it to use a single  
space:



   
  
   
   


But then when there are contiguous spaces separating values, it  
increments the field number for each space that it finds, e.g. if  
there are 28 spaces between the first field and the second field  
you get:



G005
OR
G020
G021


I'd like it to increment the field number only by 1 for each set of  
contigous spaces, so it would output the below instead:


csv:record number="1">
G005
OR
G020
G021



Thanks,
Jeff


I don't know if there's anything in the CSVGenerator that can do this,
but how about following the generator with an XSL transformer that
renumbers the fields?  So long as you're not expecting any gaps in the
fields after the contiguous spaces are taken into account, something
like



xsl:attribute>





should do the trick.


Andy.
--
http://answers.polldaddy.com/poll/771503/  Cross-site scripting poll

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Can't match elements with colons

2008-07-11 Thread solprovider
On 7/11/08, Jeff Schmitz <[EMAIL PROTECTED]> wrote:
> Hello,
>I'm trying to take the output of the CSVGenerator and transform it.
> However, my xslt will not match any of the elements that have colons in
> them.
>
> e.g. for the following xml generated by CSVGenerator:
>
>  xmlns:cinclude="http://apache.org/cocoon/include/1.0";>
>xmlns:csv="http://apache.org/cocoon/csv/1.0";>
> 
> System
> Pump and Valve System
> 
> 
>
> The following xslt will not find a match:
>  xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
>  xmlns:csv="http://apache.org/cocoon/csv/1.0#";
> version="2.0">
>  
>  
>
> select="/relex/systems/csv:document/csv:record" />
>  
>
>
>   match="/relex/systems/csv:document/csv:record">
>  
>  
> 
>
> I can match the "relex" and the "systems" tags just fine, but neither of the
> ones with colons in them.  I've tried several variations on the template
> match (e.g. match=//csv:record, etc).  any ideas?
>
> Thanks,
> Jeff

Namespaces are incredibly useful when merging XML from different
systems; I strip them as soon as possible because processing them is
annoying. An extra transform copying everything with strip-namespaces
often makes XSL code much more maintainable. Otherwise...

local-name() is your friend.  Example:
   
Rewriting your example:
   
Messy, but it works.

Enjoy,
solprovider

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Can't match elements with colons

2008-07-11 Thread Jeff Schmitz
OK, figured it out.  It was because of the '#' at the end of the csv  
namespace declaration in my xslt stylesheet.  This is a very common  
thing to do when using owl namespaces, however apparently xslt doesn't  
like it, I guess because it doesn't match exactly the csv namespace  
declaration in the xml itself.  For any semantic web/OWL practitioners  
used to just putting the # on the end, this could be a real bad  
"gotcha".


Jeff



On Jul 11, 2008, at 3:30 PM, Jeff Schmitz wrote:


Hello,
   I'm trying to take the output of the CSVGenerator and transform  
it.  However, my xslt will not match any of the elements that have  
colons in them.


e.g. for the following xml generated by CSVGenerator:

http://apache.org/cocoon/include/1.0 
">

  http://apache.org/cocoon/csv/1.0";>

System
Pump and Valve System



The following xslt will not find a match:

http://www.w3.org/1999/XSL/Transform";
xmlns:csv="http://apache.org/cocoon/csv/1.0#"; version="2.0">


  
	  








I can match the "relex" and the "systems" tags just fine, but  
neither of the ones with colons in them.  I've tried several  
variations on the template match (e.g. match=//csv:record, etc).   
any ideas?


Thanks,
Jeff




Re: CSVGenerator separators

2008-07-11 Thread solprovider
On 7/9/08, netBrackets <[EMAIL PROTECTED]> wrote:
>  Is there any way to tell the CSVGenerator to use one or more contiguous 
> spaces as a seperator?  You can tell it to use a single space:
>
>   
>  
> 
>  
>  
>   
>
>  But then when there are contiguous spaces separating values, it increments 
> the field number for each space that it finds, e.g. if there are 28 spaces 
> between the first field and the second field you get:
>
>  
>  G005
>  OR
>  G020
>  G021
>  
>
>   I'd like it to increment the field number only by 1 for each set of 
> contigous spaces, so it would output the below instead:
>
>  csv:record number="1">
>  G005
>  OR
>  G020
>  G021
>  
>  Thanks,
>  Jeff

"Is there any way to tell the CSVGenerator to use one or more
contiguous spaces as a separator?"

No.

(Probably.  You did not mention the version of Cocoon.  I looked at
the source code from Cocoon-2.1.10 because that was easily accessible
on my PC so the following is based on that version.)

The separator variable is a char.  The configuration code is:
   this.separator = parameters.getParameter("separator",
DEFAULT_SEPARATOR).charAt(0);
which scares me because a String is being dumped into a char -- feels
like overflow errors should be common .  The CSVGenerator compares
each byte of input to the separator; a match calls dumpField() which
increments the field count.  This makes sense snce the Generator was
designed for COMMA separated files where every comma distinguishes a
field.

My recommendation is change your algorithm.  The CSVGenerator is not
suitable for your purpose.

I am not certain this works (and cannot test today), but try using
map:aggregate setting a parent element and map:part with your data to
move your text into single-element XML.  Another possible method is to
use an include (cinclude, xinclude. I forget which is recommended this
week) in an XML file to add your text.  Once your text is XML, you can
use XSL to transform the text into better structured XML.

Or copy the CSVGenerator and remove the line that increments the field
count for empty fields:
private void dumpField() throws SAXException {
if (this.buffer.size() < 1) {
// Remove this line so empty fields are not counted.
//this.fieldnumber ++;
return;
}

OT: If you customize the Generator, you can also remove the namespaces
by changing the constant to the empty string:
public static final String NAMESPACE_PREFIX = "";

HTH,
solprovider

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Can't match elements with colons

2008-07-11 Thread solprovider
On 7/11/08, Jeff Schmitz <[EMAIL PROTECTED]> wrote:
> OK, figured it out.  It was because of the '#' at the end of the csv
> namespace declaration in my xslt stylesheet.  This is a very common thing to
> do when using owl namespaces, however apparently xslt doesn't like it, I
> guess because it doesn't match exactly the csv namespace declaration in the
> xml itself.  For any semantic web/OWL practitioners used to just putting the
> # on the end, this could be a real bad "gotcha".
>
> Jeff

That seems silly.  Any processing of URLs should parse the anchor
syntax.  The purpose of including an empty anchor in the URL of a DTD
(or any URL) escapes me.  (I have not kept current with Semantic Web
practices.)

You could file a bug report for the XSL Processor you are using to help others.

solprovider

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: call pipeline from XSLT

2008-07-11 Thread solprovider
On 7/10/08, Heather Rankin <[EMAIL PROTECTED]> wrote:
>  I want to be able to call a pipeline from another pipeline's XSLT in the
>  same sitemap. (The reason I need to call the pipeline from the XSLT as
>  opposed to from the sitemap directly is because I need to pass the XML
>  input data as parameters and I see no other way of doing this.)
>  Seems I should be able to use the xslt doc() function with the cocoon:/
>  protocol, e.g.
>  
> 
>  
>  However, I get a "MalformedURLException: unknown protocol: cocoon"
>  error.
>  Is this because I'm calling pipeline4 within a nested serviceServlet
>  'chain'? E.g:
>  pipeline1 calls pipeline2 calls pipeline 3 (which calls pipeline4 via
>  the XSLT)
>
>  (This is actually part of a bigger issue: I'd like to call an external
>  Block from within an XSLT but I wanted to get the answer to this
>  question first and then go from there...)
>  Heather

IIUC, you want to lookup many entries based on data in the XML.  You
have not mentioned what handles the lookup.  If you use the
SQLTransformer, the second transformation adds several
sql:execute-query elements.  The third transformation calls the
SQLTransformer.  A fourth transformation may be needed to format the
results of the the third transformation if they do not insert the
desired HTML.

This is a straight pipeline.  No transformation inserts data from
another pipeline; each just inserts the information needed for the
next step.

solprovider

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]