We are trying to work with a xml file that we will validate against a xsd schema. Is there a way to have a sort of "include" feature to include the same element repeatedly in different places of the xml (not the xsd) file? The wanted feature is really like the "parsed entities" except that I want the entity to contain an actual element that has been defined in the xsd.
PimaryFile.xml
<rootelt ...>
<myeltTemplate ...>
<bla></bla>
<bli></bli>
</myeltTemplate>
<myelt1>
<xxx1></xxx1>
....copy/paste myeltTemplate here, simple copy/paste nothing
</myelt1>
<myelt2>
<xxx7></xxx7>
....copy/paste myeltTemplate here, simple copy/paste nothing
</myelt2>
</rootelt>
and then have the xml processor generate actual xml file that looks like this:
<rootelt ...>
<myeltTemplate ...>
<bla></bla>
<bli></bli>
</myeltTemplate>
<myelt1>
<xxx1></xxx1>
<myeltTemplate ...>
<bla></bla>
<bli></bli>
</myeltTemplate>
</myelt1>
<myelt2>
<xxx7></xxx7>
<myeltTemplate ...>
<bla></bla>
<bli></bli>
</myeltTemplate>
</myelt2>
</rootelt>
and this final xml file would be validated against our xsd schema
No comments:
Post a Comment