You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xmlbeans.apache.org by "Tom Haggie (JIRA)" <xm...@xml.apache.org> on 2007/12/05 02:53:45 UTC

[jira] Created: (XMLBEANS-352) Unable to generate code when a schema has an element called "Con" on Windows

Unable to generate code when a schema has an element called "Con" on Windows
----------------------------------------------------------------------------

                 Key: XMLBEANS-352
                 URL: https://issues.apache.org/jira/browse/XMLBEANS-352
             Project: XMLBeans
          Issue Type: Bug
         Environment: Microsoft Windows, JDK1.6.0_03, Ant 
            Reporter: Tom Haggie


It tries to create a file called Con.xsb, Windows does not allow filenames to be named con, for a complete list of reserved names follow this link:
http://msdn2.microsoft.com/en-us/library/aa365247.aspx

I encountered this problem when trying to generate classes for the XSD PMML3.1 from www.dmg.org - it's a industry standard XSD so I can't change it.

Here's a demo XSD that reproduces the problem:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="Con" />
</xs:schema>

Here's a demo build.xml file that tries to compile the XSD (and fails on Windows):
<?xml version="1.0"?>
<project name="BuildPmmlXml" default="buildJava">

	<taskdef name="xmlbean" classname="org.apache.xmlbeans.impl.tool.XMLBean" classpath="C://Program Files//xmlbeans-1.0.4-jdk1.3//lib//xbean.jar"/>
	
	<target name="buildBug">
		<xmlbean schema="bug.xsd" srcgendir="bug"/>
	</target>
</project>

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: dev-help@xmlbeans.apache.org


[jira] Commented: (XMLBEANS-352) Unable to generate code when a schema has an element called "Con" on Windows

Posted by "Tom Haggie (JIRA)" <xm...@xml.apache.org>.
    [ https://issues.apache.org/jira/browse/XMLBEANS-352?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12614406#action_12614406 ] 

Tom Haggie commented on XMLBEANS-352:
-------------------------------------

I was unable to find a workaround, the need for me will still be there eventually but I'm able to ignore it for now.

Sorry

> Unable to generate code when a schema has an element called "Con" on Windows
> ----------------------------------------------------------------------------
>
>                 Key: XMLBEANS-352
>                 URL: https://issues.apache.org/jira/browse/XMLBEANS-352
>             Project: XMLBeans
>          Issue Type: Bug
>         Environment: Microsoft Windows, JDK1.6.0_03, Ant 
>            Reporter: Tom Haggie
>
> It tries to create a file called Con.xsb, Windows does not allow filenames to be named con, for a complete list of reserved names follow this link:
> http://msdn2.microsoft.com/en-us/library/aa365247.aspx
> I encountered this problem when trying to generate classes for the XSD PMML3.1 from www.dmg.org - it's a industry standard XSD so I can't change it.
> Here's a demo XSD that reproduces the problem:
> <?xml version="1.0" encoding="ISO-8859-1" ?>
> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
> <xs:element name="Con" />
> </xs:schema>
> Here's a demo build.xml file that tries to compile the XSD (and fails on Windows):
> <?xml version="1.0"?>
> <project name="BuildPmmlXml" default="buildJava">
> 	<taskdef name="xmlbean" classname="org.apache.xmlbeans.impl.tool.XMLBean" classpath="C://Program Files//xmlbeans-1.0.4-jdk1.3//lib//xbean.jar"/>
> 	
> 	<target name="buildBug">
> 		<xmlbean schema="bug.xsd" srcgendir="bug"/>
> 	</target>
> </project>

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: dev-help@xmlbeans.apache.org


[jira] Commented: (XMLBEANS-352) Unable to generate code when a schema has an element called "Con" on Windows

Posted by "Tom Haggie (JIRA)" <xm...@xml.apache.org>.
    [ https://issues.apache.org/jira/browse/XMLBEANS-352?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12548739 ] 

Tom Haggie commented on XMLBEANS-352:
-------------------------------------

Thanks for the suggestion, it doesn't seem to work for me - here's the config I'm trying .

<xb:config xmlns:xb="http://www.bea.com/2002/09/xbean/config">
<xb:qname name="Con" javaname="Good"/>
</xb:config>

It's the generation of intermediate xsb files that's the problem.

Here's the error which I stupidly missed in the actual bug report:
C:\source\build.xml:13: org.apache.xmlbeans.SchemaTypeLoaderException: C:\Temp\xbean50931.d\classes\schema\element\_nons\Con.xsb (Access is denied) (schema.system.s53FD8EF7FDCCA27C229DC88CC447BCDC.schema/element/_nons/Con) - code 9

An effective workaround would be great for me now but I do think that this is a bug and that XmlBeans should deal with reserved words. 

> Unable to generate code when a schema has an element called "Con" on Windows
> ----------------------------------------------------------------------------
>
>                 Key: XMLBEANS-352
>                 URL: https://issues.apache.org/jira/browse/XMLBEANS-352
>             Project: XMLBeans
>          Issue Type: Bug
>         Environment: Microsoft Windows, JDK1.6.0_03, Ant 
>            Reporter: Tom Haggie
>
> It tries to create a file called Con.xsb, Windows does not allow filenames to be named con, for a complete list of reserved names follow this link:
> http://msdn2.microsoft.com/en-us/library/aa365247.aspx
> I encountered this problem when trying to generate classes for the XSD PMML3.1 from www.dmg.org - it's a industry standard XSD so I can't change it.
> Here's a demo XSD that reproduces the problem:
> <?xml version="1.0" encoding="ISO-8859-1" ?>
> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
> <xs:element name="Con" />
> </xs:schema>
> Here's a demo build.xml file that tries to compile the XSD (and fails on Windows):
> <?xml version="1.0"?>
> <project name="BuildPmmlXml" default="buildJava">
> 	<taskdef name="xmlbean" classname="org.apache.xmlbeans.impl.tool.XMLBean" classpath="C://Program Files//xmlbeans-1.0.4-jdk1.3//lib//xbean.jar"/>
> 	
> 	<target name="buildBug">
> 		<xmlbean schema="bug.xsd" srcgendir="bug"/>
> 	</target>
> </project>

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: dev-help@xmlbeans.apache.org


[jira] Commented: (XMLBEANS-352) Unable to generate code when a schema has an element called "Con" on Windows

Posted by "Jacob Danner (JIRA)" <xm...@xml.apache.org>.
    [ https://issues.apache.org/jira/browse/XMLBEANS-352?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12548528 ] 

Jacob Danner commented on XMLBEANS-352:
---------------------------------------

I've seen similar issues with names like lpt1, etc. 
I was able to get around these issues using an xsdconfig file to map a name to something else.
Does this workaround not do for you?

Is there another solution what you were seeking for this? Do you want XmlBeans to try and handle windows reserved words like it handles java reserved keywords?

> Unable to generate code when a schema has an element called "Con" on Windows
> ----------------------------------------------------------------------------
>
>                 Key: XMLBEANS-352
>                 URL: https://issues.apache.org/jira/browse/XMLBEANS-352
>             Project: XMLBeans
>          Issue Type: Bug
>         Environment: Microsoft Windows, JDK1.6.0_03, Ant 
>            Reporter: Tom Haggie
>
> It tries to create a file called Con.xsb, Windows does not allow filenames to be named con, for a complete list of reserved names follow this link:
> http://msdn2.microsoft.com/en-us/library/aa365247.aspx
> I encountered this problem when trying to generate classes for the XSD PMML3.1 from www.dmg.org - it's a industry standard XSD so I can't change it.
> Here's a demo XSD that reproduces the problem:
> <?xml version="1.0" encoding="ISO-8859-1" ?>
> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
> <xs:element name="Con" />
> </xs:schema>
> Here's a demo build.xml file that tries to compile the XSD (and fails on Windows):
> <?xml version="1.0"?>
> <project name="BuildPmmlXml" default="buildJava">
> 	<taskdef name="xmlbean" classname="org.apache.xmlbeans.impl.tool.XMLBean" classpath="C://Program Files//xmlbeans-1.0.4-jdk1.3//lib//xbean.jar"/>
> 	
> 	<target name="buildBug">
> 		<xmlbean schema="bug.xsd" srcgendir="bug"/>
> 	</target>
> </project>

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: dev-help@xmlbeans.apache.org


[jira] Commented: (XMLBEANS-352) Unable to generate code when a schema has an element called "Con" on Windows

Posted by "Dan Flynn (JIRA)" <xm...@xml.apache.org>.
    [ https://issues.apache.org/jira/browse/XMLBEANS-352?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12614189#action_12614189 ] 

Dan Flynn commented on XMLBEANS-352:
------------------------------------

Hi Tom or Jacob,

Did you guys ever figure out a good work around for this one?  I have the same issue with an industry standard schema that is using "CON" as an element name in the defintion.  If it was a complex type, then I would simply rename the type and update the referenced, but it is an element and I cannot do that.

Any help would be appreciated.  Thanks.

Dan

> Unable to generate code when a schema has an element called "Con" on Windows
> ----------------------------------------------------------------------------
>
>                 Key: XMLBEANS-352
>                 URL: https://issues.apache.org/jira/browse/XMLBEANS-352
>             Project: XMLBeans
>          Issue Type: Bug
>         Environment: Microsoft Windows, JDK1.6.0_03, Ant 
>            Reporter: Tom Haggie
>
> It tries to create a file called Con.xsb, Windows does not allow filenames to be named con, for a complete list of reserved names follow this link:
> http://msdn2.microsoft.com/en-us/library/aa365247.aspx
> I encountered this problem when trying to generate classes for the XSD PMML3.1 from www.dmg.org - it's a industry standard XSD so I can't change it.
> Here's a demo XSD that reproduces the problem:
> <?xml version="1.0" encoding="ISO-8859-1" ?>
> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
> <xs:element name="Con" />
> </xs:schema>
> Here's a demo build.xml file that tries to compile the XSD (and fails on Windows):
> <?xml version="1.0"?>
> <project name="BuildPmmlXml" default="buildJava">
> 	<taskdef name="xmlbean" classname="org.apache.xmlbeans.impl.tool.XMLBean" classpath="C://Program Files//xmlbeans-1.0.4-jdk1.3//lib//xbean.jar"/>
> 	
> 	<target name="buildBug">
> 		<xmlbean schema="bug.xsd" srcgendir="bug"/>
> 	</target>
> </project>

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: dev-help@xmlbeans.apache.org


[jira] Commented: (XMLBEANS-352) Unable to generate code when a schema has an element called "Con" on Windows

Posted by "Radu Preotiuc-Pietro (JIRA)" <xm...@xml.apache.org>.
    [ https://issues.apache.org/jira/browse/XMLBEANS-352?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12615788#action_12615788 ] 

Radu Preotiuc-Pietro commented on XMLBEANS-352:
-----------------------------------------------

Here's a crazy workaround: compile the Schema on Linux, then copy the compiled jar over to Windows and then you can use it no problem (it works, I've tried).


> Unable to generate code when a schema has an element called "Con" on Windows
> ----------------------------------------------------------------------------
>
>                 Key: XMLBEANS-352
>                 URL: https://issues.apache.org/jira/browse/XMLBEANS-352
>             Project: XMLBeans
>          Issue Type: Bug
>         Environment: Microsoft Windows, JDK1.6.0_03, Ant 
>            Reporter: Tom Haggie
>
> It tries to create a file called Con.xsb, Windows does not allow filenames to be named con, for a complete list of reserved names follow this link:
> http://msdn2.microsoft.com/en-us/library/aa365247.aspx
> I encountered this problem when trying to generate classes for the XSD PMML3.1 from www.dmg.org - it's a industry standard XSD so I can't change it.
> Here's a demo XSD that reproduces the problem:
> <?xml version="1.0" encoding="ISO-8859-1" ?>
> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
> <xs:element name="Con" />
> </xs:schema>
> Here's a demo build.xml file that tries to compile the XSD (and fails on Windows):
> <?xml version="1.0"?>
> <project name="BuildPmmlXml" default="buildJava">
> 	<taskdef name="xmlbean" classname="org.apache.xmlbeans.impl.tool.XMLBean" classpath="C://Program Files//xmlbeans-1.0.4-jdk1.3//lib//xbean.jar"/>
> 	
> 	<target name="buildBug">
> 		<xmlbean schema="bug.xsd" srcgendir="bug"/>
> 	</target>
> </project>

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: dev-help@xmlbeans.apache.org


[jira] Commented: (XMLBEANS-352) Unable to generate code when a schema has an element called "Con" on Windows

Posted by "Dan Flynn (JIRA)" <xm...@xml.apache.org>.
    [ https://issues.apache.org/jira/browse/XMLBEANS-352?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12614453#action_12614453 ] 

Dan Flynn commented on XMLBEANS-352:
------------------------------------

No worries Tom.  I appreciate the quick feedback on this one.

Thanks, 
Dan

> Unable to generate code when a schema has an element called "Con" on Windows
> ----------------------------------------------------------------------------
>
>                 Key: XMLBEANS-352
>                 URL: https://issues.apache.org/jira/browse/XMLBEANS-352
>             Project: XMLBeans
>          Issue Type: Bug
>         Environment: Microsoft Windows, JDK1.6.0_03, Ant 
>            Reporter: Tom Haggie
>
> It tries to create a file called Con.xsb, Windows does not allow filenames to be named con, for a complete list of reserved names follow this link:
> http://msdn2.microsoft.com/en-us/library/aa365247.aspx
> I encountered this problem when trying to generate classes for the XSD PMML3.1 from www.dmg.org - it's a industry standard XSD so I can't change it.
> Here's a demo XSD that reproduces the problem:
> <?xml version="1.0" encoding="ISO-8859-1" ?>
> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
> <xs:element name="Con" />
> </xs:schema>
> Here's a demo build.xml file that tries to compile the XSD (and fails on Windows):
> <?xml version="1.0"?>
> <project name="BuildPmmlXml" default="buildJava">
> 	<taskdef name="xmlbean" classname="org.apache.xmlbeans.impl.tool.XMLBean" classpath="C://Program Files//xmlbeans-1.0.4-jdk1.3//lib//xbean.jar"/>
> 	
> 	<target name="buildBug">
> 		<xmlbean schema="bug.xsd" srcgendir="bug"/>
> 	</target>
> </project>

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: dev-help@xmlbeans.apache.org