Re: DTD - parameter entity
Been a very long time since I've done any DTD, however I'd say your example XML looks wrong to me.
Is that taken from a real example/requirement or is it just something you put together to try and solve your problem?
Your XML is going to have problems with the "name" nodes ("luke" and "angie") because it will make you unable to group up content, and I think it might be where your issues also spring from.
If the XML is something you control; I would advice you to get it rewritten into something more XML-ish like for example:
Code:
<accounts>
<account>
<owner>luke</owner>
<shipping_address>
<address></address>
<street></street>
<city></city>
<postcode></postcode>
</shipping_address>
</account>
<account>
<owner>angie</owner>
<billing_address>
<address></address>
<street></street>
<city></city>
<postcode></postcode>
</billing_address>
</account>
</accounts>
This should enable you to avoid having to repeat your billing_address element, as the entire account element would be the same in a sequence, whereas in your own example, a "luke" tag would not be the same as an "angie" tag.
I hope this helps, but if not - ignore what I said :D