logo       
Google Custom Search
    AddThis Social Bookmark Button

[ xframe-Bugs-949282 ] Duplicate global variable declaration exception: msg#00003

Subject: [ xframe-Bugs-949282 ] Duplicate global variable declaration exception
Bugs item #949282, was opened at 2004-05-06 11:35
Message generated for change (Comment added) made by andleigh
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=454391&aid=949282&group_id=48863

Category: all platforms
Group: beta-0.4
Status: Open
Resolution: Accepted
Priority: 3
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

----------------------------------------------------------------------

>Comment By: Vab (andleigh)
Date: 2004-05-06 17:45

Message:
Logged In: YES 
user_id=1035278

Replacing ant's existing xalan.jar with Version 2.6 worked, and everything is 
fine.

Thanks for the quick fix!!!!

Vab

----------------------------------------------------------------------

Comment By: Kurt Riede (kriede)
Date: 2004-05-06 12:38

Message:
Logged In: YES 
user_id=484961

Fixed in CVS.
Will be available with next release 0.5 beta

----------------------------------------------------------------------

Comment By: Kurt Riede (kriede)
Date: 2004-05-06 12:17

Message:
Logged In: YES 
user_id=484961

Thanx for the extensive information.
I was able to reproduce it with some old versions of xalan.
And indeed we have a duplicate variable declaration in 
component.xsl and the included xmldoc.xsl (mainSchema).
I'm not sure if this is invalid with respect to the XSL-T 
specification, but anyway it' easy to solve and will be fixed in 
the next release 0.5 beta.

For now you could update your ant installation to a newer 
version of XalanJ by dropping the corresponding file Xalan.jar 
into the lib folder of your ant installation.
XalanJ Version 2.5.1 or higher should work

----------------------------------------------------------------------

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



Try Searching:
servers, voip, java, networking, microsoft ...
<Prev in Thread] Current Thread [Next in Thread>