deva-rajan / hamake

Automatically exported from code.google.com/p/hamake
0 stars 0 forks source link

XSD scheme that allows elements placement in free order #34

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Please, review current XSD scheme for hamakefile and propose best solution for 
relaxing strict elements order.
for example:
<foreach>
<description .../>
<dependencies .../>
<input .../>
<output .../>
</foreach>

Original issue reported on code.google.com by abon...@gmail.com on 8 Jun 2010 at 9:58

GoogleCodeExporter commented 9 years ago
xs:all should work here:

http://www.w3schools.com/schema/el_all.asp

although it allows elements in arbitrary order, you could not specify maxOccurs 
more than 1. 

Original comment by kroko...@gmail.com on 8 Jun 2010 at 6:25

GoogleCodeExporter commented 9 years ago
I just checked that would work for task_group since all elements there appear 
only 0 or 1 times.

Please change the XSD file accordingly.

Also please more XSD file from source directory to etc in the project.

Original comment by kroko...@gmail.com on 8 Jun 2010 at 6:26

GoogleCodeExporter commented 9 years ago
<all> element can't be used together with <choice>

Original comment by abon...@gmail.com on 10 Jun 2010 at 12:39

GoogleCodeExporter commented 9 years ago
pls take a look

Original comment by kroko...@gmail.com on 21 Jun 2010 at 4:44

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
http://esw.w3.org/Needs_choice_inside_all
substitution group approach looks promising

Original comment by alex.s...@gmail.com on 22 Jun 2010 at 11:54

GoogleCodeExporter commented 9 years ago
any news?

Original comment by kroko...@gmail.com on 25 Jun 2010 at 5:26

GoogleCodeExporter commented 9 years ago
Fixed this issue as it was suggested by alex.sova, but this approach has one 
disadvantage - in case substitution group approach we can not restrict 
uniqueness of sub-elements, thus one can write:
<foreach name="map">
        <description>first map</description>
        <input>
            ...
        </input>
        <output>
            ...
        </output>
        <output>
            ...
        </output>
</foreach>  

instead of 

<foreach name="map">
        <description>first map</description>
        <input>
            ...
        </input>
        <output>
            ...
        </output>       
        <exec binary="${cp}">
            ...
        </exec>
</foreach>

Original comment by vorl.s...@gmail.com on 5 Jul 2010 at 11:21

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r342.

Original comment by vorl.s...@gmail.com on 6 Jul 2010 at 3:54

GoogleCodeExporter commented 9 years ago
lets' keep order

Original comment by kroko...@gmail.com on 12 Jul 2010 at 4:34

GoogleCodeExporter commented 9 years ago
fixed in r347

Original comment by vorl.s...@gmail.com on 13 Jul 2010 at 8:22