Bug #1855
closedGetting duplicate function error when I run some XML Code
0%
Description
Hi
I am getting some duplicate function declaration error.
The XQuery code is run on an XML file attached- please change the $Doc parameter to that XML file in the XQuery code that is being run.
For reference, I have attached 12 such pieces of XQuery code that all have to be run on the same XML file.
Yours sincerely,
Arvind.
Files
Updated by Michael Kay over 11 years ago
- Priority changed from High to Normal
I'm sorry, I don't understand how I am supposed to run these queries. The XQuery code is embedded in CDATA sections in an XML document; there must be some kind of driver program which you have not supplied, which extracts the query from the XML wrapper and then executes it.
Updated by Arvind IK Chari over 11 years ago
Hello Michael
Saxon is being used in a custom web crawler/ the crawler downloads the HTML page-> converts it to XML (that is the attached XML).
Now the separate 12 queries are run 1 by 1 on the XML and the data collected/stored in excel files (separate 12 excel files).
The reason I have not given the entire package to you earlier? So that you dont get bogged down in the workings of the crawler- in any case the portion that is not working is the queries I have attached- you can remove the formatting and try and run the queries (I am getting many "duplicate function declaration " errors when I try and run the queries and I had posted this on the forum as well- you had asked me to raise a ticket).
If you want I can attach the crawler as well as the entire XML which is run by the crawler(I have attached the queries only as they are part of the entire XML which includes downloading the HTML file, converting it to XML, extracting data, saving this data to excel and so on). And the crawler work (extracting HTML, converting to XML) works fine. Its at this stage (executing XQuery) that I am getting the errors.
Frankly I think I raised something similar many months back on the SourceForge forums as well- but I tried and could not find that forum topic now. (As far as I remember it was same issue of duplicate function definition error but I am not sure as it was some time back). Have the sourceforge forums been imported into the forums here as well? I will try and search again here in that case(tried in sourceforge forums and did not find the old issue).
Yours sincerely,
Arvind.
Updated by Michael Kay over 11 years ago
I can't diagnose this problem for you without being able to run the queries. So I need to see how the queries are being run. The problem is almost certainly related to the way the queries are being run.
If you can reproduce the problem in a simpler environment that of course would be the ideal.
Updated by Arvind IK Chari over 11 years ago
- File crawler.zip crawler.zip added
- File Data Crawler Core.zip added
Hi
Attached with this message are the crawler (JAR) file, the XML containing the queries that are being run.
If you run the crawler via command line-
java -jar d:\data_output d:\crawljob.xml
Where- crawljob.xml is the "Crawl Job" that is run by the crawler.
The crawler source code is also attached.
Yours sincerely,
Arvind.
Updated by Michael Kay over 11 years ago
I have deleted the Data Crawler Zip file because it is 125Mb and consists almost entirely of JAR files for third party software, for which the licensing conditions are unspecified. We don't want to run the risk of posting software on this site that we have no right to redistribute. I have extracted the Java source files which were a tiny part of the download.
Updated by Michael Kay over 11 years ago
I'm sorry, but this application is so complex, with so many dependencies on other software components, that I can't help you debug it.
If you believe that there is a Saxon bug here, then you will have to try to construct a much simpler application that demonstrates the bug.
So far as I can tell from the evidence provided, the error reported by Saxon is legitimate: you are constructing a query that contains two copies of the same function.
We always try to provide help when we can, but ultimately (and this is true even for paying customers), if you cannot provide a demonstration of a problem that we can run without installing third-party software, they you're on your own.
(Note: I tried to build the application but for starters, it depends on Java 7, and to debug a Java 7 application on Mac I need to upgrade IntelliJ, which has other complications and costs money. So it's not easy. I would do it for a commercial customer if there were clear evidence of a bug, but it's beyond what we can provide as a free service for open source users.)
Updated by O'Neil Delpratt about 11 years ago
- Status changed from New to Closed
Closed without resolution; insufficient material available to reproduce the problem.
If you can supply a repro that we can run, you are welcome to reopen the issue.
Please register to edit this issue