PDA

View Full Version : anchored attributes behave different than elements?



JMessmer
October 30th, 2017, 21:37
Hello,

I am working on the DSA ruleset ( The Dark Eye ) at the moment. While trying to shorten some of the code by using XML attributes rather than elements I found that this code:

<anchored>

<to>werte_uebersicht</to>
<position>insidetopleft</position>
<offset>40,30</offset>
</anchored>
behaves different to this one:

<anchored to="werte_uebersicht" position="insidetopleft" offset="40,30" />

Can anybody tell me why?
I was expecting it to work exactly the same way.

Moon Wizard
October 30th, 2017, 23:28
It should work the same as long as that is the final output. If the tags and attributes are used in templates or attempting to override templates, then they both must use the same mechanism (tags or attributes).

Regards,
JPG

JMessmer
October 31st, 2017, 20:04
It should work the same as long as that is the final output. If the tags and attributes are used in templates or attempting to override templates, then they both must use the same mechanism (tags or attributes).

Regards,
JPG

Thanks Jpg, the tags and attributes were overriding other tags in elements that were defined in templates.