I am doing a Schematron validation on an XML file and my result looks like this:
<fired-rule context="Message[@Name='SPY_IN']"/>
<failed-assert test="@OppositeMacAddress='0x00'" location="/Module[1]/Router[1]/Message[1]">
<text>!Error! Erwarteter Wert:"0x00"</text>
</failed-assert>
<fired-rule context="Configuration[@Address='W_ST_PLAMA_MOD_OWM_OPP']"/>
<failed-assert test="@Name='8'"
location="/Module[1]/DriverConfigurations[1]/DriverConfiguration[20]/Configuration[10]">
<text>!Error! Erwarteter Wert:"8"</text>
</failed-assert>
Now i am trying to generate a XML file that referes to the "location"-attribute. It should look like this:
<Module>
<Router>
<Message>
</Message>
</Router>
</Module>
<Module>
<DriverConfigurations>
<DriverConfiguration>
<Configuration>
</Configuration>
</DriverConfiguration>
</DriverConfigurations>
</Module>
I tried to refer to this: auto creating xml elements using XSLT But it somehow doesnt work for me. So i have no idea how my xsl file should look like. Any idea?