Bugs item #949282, was opened at 2004-05-06 11:35
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=454391&aid=949282&group_id=48863
Category: ant
Group: beta-0.4
Status: Open
Resolution: None
Priority: 5
Submitted By: Vab (andleigh)
Assigned to: Kurt Riede (kriede)
Summary: Duplicate global variable declaration exception
Initial Comment:
Although xsddoc works fine from the command line with my schema
(included below), in Ant, i get a Duplicate global variable declaration
exception. Stack trace is at the bottom of this message. I have not
modified any of the jar files in the ant/lib directory.
I am using:
xsddoc-0.4-beta
apache-ant-1.6.1
xalan (within xsddoc lib directory) xalan-j_2_3_1_01
xalan (in ant lib directory)
ant-xalan1.jar, ant-xalan2.jar (given the size of these files, I think these
are only running another xalan somewhere else but i don't know
enough about the implementation of Ant to answer that any better)
Here is the schema I was running -- xsddoc runs it fine from the
command line but fails to run in Ant
[vab-0Mdo4pY7sno@xxxxxxxxxxxxxxxx hdf]$ more dataPathList.xsd
--------------------
<?xml version="1.0"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema";
targetNamespace="http://ll.mit.edu";
xmlns="http://ll.mit.edu";
elementFormDefault="qualified">
<xsd:element name="dataPathList">
<xsd:complexType>
<xsd:sequence>
<xsd:element type="xsd:string" name="hdfDataPath"
maxOccurs="unbounded" minOccurs="1">
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
---------------------
Here is my Ant task:
<target name="xsddocs" description="Creates xsd-documentation">
<mkdir
dir="${xsddocs.dir}" >
</mkdir>
<xsddoc out="${top.dir}/xsddocs"
title="LLSIM Schema Documentation"
verbose="true" >
<fileset dir="${run.schemas.dir}" includes="dataPathList.xsd" />
</xsddoc>
</target>
<taskdef name="xsddoc" classname="net.sf.xframe.xsddoc.Task">
<classpath>
<pathelement location="${outsideLibs.dir}/xsddoc.jar"/>
</classpath>
</taskdef>
-----------------------------------
Here is the log and exception stack trace from Ant in -debug mode:
##################################
xsddocs:
Class java.util.Vector loaded from parent loader (parentFirst)
Finding class net.sf.xframe.xsddoc.Processor
Loaded from /home/vab/workspace/llteam/lib/xsddoc.jar
net/sf/xframe/xsddoc/Processor.class
Class net.sf.xframe.xsddoc.Processor loaded from ant loader
(parentFirst)
<log section omitted by Vab>
Class java.lang.System loaded from parent loader (parentFirst)
Class javax.xml.transform.SourceLocator loaded from parent loader
(parentFirst)
Class java.io.PrintStream loaded from parent loader (parentFirst)
[xsddoc] error: Duplicate global variable declaration at resource:
/net/sf/xframe/xsddoc/xslt/xmldoc.xsl:-1#-1
[xsddoc] error: Duplicate global variable declaration at resource:
/net/sf/xframe/xsddoc/xslt/xmldoc.xsl:-1#-1
BUILD FAILED
/home/vab/workspace/llteam/src/java/mitll/build.xml:755: net.sf.xframe.
xsddoc.ProcessorException: Duplicate global variable declaration
at net.sf.xframe.xsddoc.Task.execute(Unknown Source)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.
java:269)
at org.apache.tools.ant.Task.perform(Task.java:364)
at org.apache.tools.ant.Target.execute(Target.java:301)
at org.apache.tools.ant.Target.performTasks(Target.java:328)
at org.apache.tools.ant.Project.executeTarget(Project.java:1215)
at org.apache.tools.ant.Project.executeTargets(Project.java:1063)
at org.apache.tools.ant.Main.runBuild(Main.java:632)
at org.apache.tools.ant.Main.startAnt(Main.java:183)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:197)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:56)
Caused by: net.sf.xframe.xsddoc.ProcessorException: Duplicate global
variable declaration
at com.icl.saxon.style.StyleElement.compileError(StyleElement.java:
843)
at com.icl.saxon.style.XSLGeneralVariable.
checkDuplicateDeclaration(XSLGeneralVariable.java:180)
at com.icl.saxon.style.XSLVariable.validate(XSLVariable.java:38)
at com.icl.saxon.style.StyleElement.validateSubtree(StyleElement.java:
472)
at com.icl.saxon.style.XSLStyleSheet.preprocess(XSLStyleSheet.java:
337)
at com.icl.saxon.PreparedStyleSheet.
setStyleSheetDocument(PreparedStyleSheet.java:159)
at com.icl.saxon.PreparedStyleSheet.prepare(PreparedStyleSheet.
java:116) at com.icl.saxon.TransformerFactoryImpl.
newTemplates(TransformerFactoryImpl.java:119)
at com.icl.saxon.TransformerFactoryImpl.
newTransformer(TransformerFactoryImpl.java:71)
at net.sf.xframe.xsddoc.Processor.createTransformer(Unknown
Source)
at net.sf.xframe.xsddoc.Processor.initTransformers(Unknown Source)
at net.sf.xframe.xsddoc.Processor.init(Unknown Source)
at net.sf.xframe.xsddoc.Processor.execute(Unknown Source)
... 12 more
--- Nested Exception ---
net.sf.xframe.xsddoc.ProcessorException: Duplicate global variable
declaration
at net.sf.xframe.xsddoc.Processor.execute(Unknown Source)
at net.sf.xframe.xsddoc.Task.process(Unknown Source)
at net.sf.xframe.xsddoc.Task.execute(Unknown Source)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.
java:269)
at org.apache.tools.ant.Task.perform(Task.java:364)
at org.apache.tools.ant.Target.execute(Target.java:301)
at org.apache.tools.ant.Target.performTasks(Target.java:328)
at org.apache.tools.ant.Project.executeTarget(Project.java:1215)
at org.apache.tools.ant.Project.executeTargets(Project.java:1063)
at org.apache.tools.ant.Main.runBuild(Main.java:632)
at org.apache.tools.ant.Main.startAnt(Main.java:183)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:197)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:56)
Caused by: javax.xml.transform.TransformerConfigurationException:
Duplicate global variable declaration
at com.icl.saxon.style.StyleElement.compileError(StyleElement.java:
843)
at com.icl.saxon.style.XSLGeneralVariable.
checkDuplicateDeclaration(XSLGeneralVariable.java:180)
at com.icl.saxon.style.XSLVariable.validate(XSLVariable.java:38)
at com.icl.saxon.style.StyleElement.validateSubtree(StyleElement.java:
472)
at com.icl.saxon.style.XSLStyleSheet.preprocess(XSLStyleSheet.java:
337)
at com.icl.saxon.PreparedStyleSheet.
setStyleSheetDocument(PreparedStyleSheet.java:159)
at com.icl.saxon.PreparedStyleSheet.prepare(PreparedStyleSheet.
java:116) at com.icl.saxon.TransformerFactoryImpl.
newTemplates(TransformerFactoryImpl.java:119)
at com.icl.saxon.TransformerFactoryImpl.
newTransformer(TransformerFactoryImpl.java:71)
at net.sf.xframe.xsddoc.Processor.createTransformer(Unknown
Source)
at net.sf.xframe.xsddoc.Processor.initTransformers(Unknown Source)
at net.sf.xframe.xsddoc.Processor.init(Unknown Source)
at net.sf.xframe.xsddoc.Processor.execute(Unknown Source)
... 12 more
------------------------
Thanks,
Vab
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=454391&aid=949282&group_id=48863
-------------------------------------------------------
This SF.Net email is sponsored by Sleepycat Software
Learn developer strategies Cisco, Motorola, Ericsson & Lucent use to deliver
higher performing products faster, at low TCO.
http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3
|