XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Topic Page 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
Mark EisenbergSubject: XML Pipeline Troubleshooting
Author: Mark Eisenberg
Date: 20 Nov 2013 04:23 PM
I have a fairly simple pipeline built and am having trouble in the final stages. Everything works fine as long as I am using the normal input stream. I have implemented a simple merge using both XQuery and XSLT. Four input variables/params that specify the input files and then write them to the standard output stream. However, when I try to connect them in to a pipeline they blow up for a variety of reasons. The XSLT did not like some apostrophes that are in a few text nodes and both are throwing errors related to data that is not actually in the input files. Here's an example:
Error: XQUERY processing by XQUERY node 'MergePipelineBranchOutputs.xquery' failed: Error: on line 1 column 1 of MergePipelineBranchOutputs.xquery:
XPST0017 XQuery static error near #...contentpage> </contentpages>')#:
Unknown system function any()

This is indicating a problem at the end of the file, but there is no data in the file beyond that last element. The XSLT is gagging on something similar. Neither gives any useful information about the specific location in the code that is triggering the error.

I've attached both the query and the transform files.

How do I go about troubleshooting this?


DocumentMergePipelineBranchOutputs.xquery
XQuery file

UnknownMergePipelineBranchOutputs.xsl
XSLT

Postnext
Ivan PedruzziSubject: XML Pipeline Troubleshooting
Author: Ivan Pedruzzi
Date: 21 Nov 2013 12:49 AM
Hi Mark,

XML Pipeline is designed for processing XML data on the edges.

Here two alternative solutions:

- Feed your pipeline with XML file in which you list the document URIs
<docs>
<doc uri="file:///c:/x.xml">
<doc uri="file:///c:/y.xml">
<doc uri="file:///c:/x.xml">
</docs>

change you code to

<front>
<contentpages>{
for $uri in /docs/doc/@uri
return doc($uri)//contentpage
}</contentpages>
</front>

- use collection function to load a document collection using a wild card

<front>
<contentpages>{
collection("file:///c:?select=*.xml")//contentpage
}</contentpages>
</front>


Does it help?


Ivan Pedruzzi
Stylus Studio Team

Postnext
Mark EisenbergSubject: XML Pipeline Troubleshooting
Author: Mark Eisenberg
Date: 21 Nov 2013 08:10 AM
Can you clarify what you mean by "XML Pipeline is designed for processing XML data on the edges."?

Both of your suggestions work around the issue. A little kludgey for my taste since pipelines seem so elegant. Where is the problem?

Mark

Postnext
Ivan PedruzziSubject: XML Pipeline Troubleshooting
Author: Ivan Pedruzzi
Date: 21 Nov 2013 09:22 AM
Originally Posted: 21 Nov 2013 09:20 AM
Have a look at the attached project, see if it does what you are looking for.

When generating the Java code, un-check "Generate inline code", which does not support primitive types as pipeline parameters.


Ivan Pedruzzi
Stylus Studio Team


Documentpipeline-project.zip

Postnext
Mark EisenbergSubject: XML Pipeline Troubleshooting
Author: Mark Eisenberg
Date: 21 Nov 2013 10:37 AM
That's pretty much what my pipeline looks like. Now why does yours work with my stream files (which I copied to your project directory) and mine does not. I even tried using your copy of the XSL and it breaks in my pipeline.

This is just weird.


DocumentBuildFreePagesStage2.pipeline
Broken pipeline

Postnext
Ivan PedruzziSubject: XML Pipeline Troubleshooting
Author: Ivan Pedruzzi
Date: 21 Nov 2013 11:08 AM

Make sure that your input ports are set to interpret the default value as primitive rather than the URL from which to read the data.


Ivan Pedruzzi
Stylus Studio Team

Postnext
Mark EisenbergSubject: XML Pipeline Troubleshooting
Author: Mark Eisenberg
Date: 21 Nov 2013 12:32 PM
Where are you setting that?

Postnext
Ivan PedruzziSubject: XML Pipeline Troubleshooting
Author: Ivan Pedruzzi
Date: 21 Nov 2013 12:41 PM

Look at the screenshot I posted
http://www.stylusstudio.com/SSDN/default.asp?action=9&read=9902&fid=23#30757

Click on the Input block, look at its properties, click on Default Value.

Ivan Pedruzzi
Stylus Studio Team

Postnext
Mark EisenbergSubject: XML Pipeline Troubleshooting
Author: Mark Eisenberg
Date: 21 Nov 2013 03:01 PM
That yields this:

Error: on line 1 column 1 of PIP7E7C.tmp: SXXP0003: Error reported by XML parser: Content is not allowed in prolog.
Error: XSLT processing by XSLT node 'MergePipelineBranchOutputs.xsl' failed: PIP7E7C.tmp (1, 1): Error: on line 1 column 1 of PIP7E7C.tmp:
SXXP0003: Error reported by XML parser: Content is not allowed in prolog.

Posttop
Ivan PedruzziSubject: XML Pipeline Troubleshooting
Author: Ivan Pedruzzi
Date: 21 Nov 2013 03:26 PM

Most likely if you set it for the XSLT main input which is required to be XML.

I will send you private email with a proposal for a gotomeeting session.
I fell it will be more productive then going back and forth.

Ivan Pedruzzi
Stylus Studio Team

 
Topic Page 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.