XSD validation mit PHP
bearbeitet von Gunnar BittersmannMoin.
meine XML sieht in etwa so aus:
~~~xml
<?xml version="1.0" encoding="utf-8"?>
<a:haus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:a="https://xxx/a" > xmlns:b="https://xxx/b" xsi:schemaLocation="https://xxx/a https://xxx/a.xsd">
<a:dach>1</a:dach>
<a:haustuer>1</a:haustuer>
<a:zimmer>
<b:kueche>1</b:kueche>
<b:flur>2</b:flur>
...
</a:zimmer>
<a:haus>
~~~
Wenn diese jetzt mit der a.xsd validiert wird, kommt beim Liquid Studio ein "...valid against the schemas ...". Also alles ok. Per PHP [schemaValidate()](https://www.php.net/manual/de/domdocument.schemavalidate.php) kommt folgende Meldung:
> Internal error: xmlSchemaParseIncludeOrRedefine, could not build an URI from the schemaLocation.
> Internal error: xmlSchemaParse, An internal error occurred.
Woran kann das liegen?
XSD validation mit PHP
bearbeitet von dedlfixMoin.
meine XML sieht in etwa so aus:
> <?xml version="1.0" encoding="utf-8"?>
> <a:haus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:a="https://xxx/a" > xmlns:b="https://xxx/b" xsi:schemaLocation="https://xxx/a https://xxx/a.xsd">
> <a:dach>1</a:dach>
> <a:haustuer>1</a:haustuer>
> <a:zimmer>
> <b:kueche>1</b:kueche>
> <b:flur>2</b:flur>
> ...
> </a:zimmer>
> <a:haus>
Wenn diese jetzt mit der a.xsd validiert wird, kommt beim Liquid Studio ein "...valid against the schemas ...". Also alles ok. Per PHP [schemaValidate()](https://www.php.net/manual/de/domdocument.schemavalidate.php) kommt folgende Meldung:
> Internal error: xmlSchemaParseIncludeOrRedefine, could not build an URI from the schemaLocation.
> Internal error: xmlSchemaParse, An internal error occurred.
Woran kann das liegen?