Validate XML using a custom schema without ignoring keys

Hello,

I have a bit of an issue. I wrote a custom schema that I’m validating a document against.

I use the DomDocument::schemaValidate function to validate the XML against the schema.

Everything works fine, except it still works fine even if there are duplicate keys or unique values, or if my keyref isn’t a value defined by a key.

Any ideas how to get this to work, or any other functions that’ll do the validation better (without manually keeping track of the keys myself).

Thanks.