tksk / jing-trang

Automatically exported from code.google.com/p/jing-trang
0 stars 0 forks source link

inconsistent results when generating schema from xml #122

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. starting with attached .xml file, use trang to automatically generate two 
schemas:
>java -jar <path_to_trang> example.xml foo1.xsd 
>java -jar <path_to_trang> example.xml foo2.xsd 

2. compare the two generated schemas:
> diff foo1.xsd foo2.xsd

If they are identical, try re-generating one. On my system I find that the two 
differ about 50% of the time.

What is the expected output? What do you see instead?

I expected the generated outputs to be identical. Instead, while they contain 
the same information, the order the schema elements changes between the two.

What version of the product are you using? On what operating system?
- trang-20091111/trang.jar
- tested on java versions "1.5.0" (on linux) and "1.6.0_20" (OS X 10.6.4), 
problem shows up both places

Please provide any additional information below.

A change in order of the elements shouldn't really cause a problem for using a 
schema, but it does cause trouble if we want to update the schema and diff to 
check the changes to previous versions.
I speculate that these differences could result from threads in the code?

 Thanks,
 Caleb

Original issue reported on code.google.com by matto...@gmail.com on 7 Oct 2010 at 5:01

Attachments: