I try to validate a docbook 5.0 xml via c# and xsd data.
I started from the example here: http://ift.tt/1n92dbt where it is pretty easy and simple. I made the notValidXSD.xml (in the example) valid removing the first book caling it nowValidXSD.xml and it words fine.
Now i tried the same for the Docbook 5.0 format ( docbook.xsd, xml.xsd xlink.xml ) which you can download here http://ift.tt/1n92afF
Trying the code ( given by the example on msdn above) gives me :
Validating XML file mydocxml.xml
Validation error: the http ://www.w3.org/XML/1998/namespace:id-Attribute is not declared.
Validation error: the http ://docbook.org/ns/docbook:article-Element is not declared.
Validation error: the schema informationen für das Attribute 'version' could not be found.
Validation error: the http://ift.tt/1n92dbv is not declared.
Validation error: the http://ift.tt/1n92dbx is not declared.
Validation finished. Validation failed.
( i hat to make spaces after http becouse its my first question here ) I dont know what to do anymore. For me the files look fine. I tried googling the problem for hours now and cant seeem to be able to validate via c#.
Here are the files:
<!-- nowValidXSD.xml -->
<?xml version='1.0' encoding="UTF-8"?>
<bookstore xmlns="urn:bookstore-schema"
xmlns:xsi="http ://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:bookstore-schema books.xsd">
<book genre="novel">
<title>The Confidence Man</title>
<author>
<first-name>Herman</first-name>
<last-name>Melville</last-name>
</author>
<price>11.99</price>
</book>
</bookstore>
And the docbook xml
<!-- mydocxml.xml -->
<?xml version="1.0" encoding="UTF-8"?> <!-- -->
<article xmlns="http ://docbook.org/ns/docbook" version="5.0"
xmlns:xsi="http ://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http ://docbook.org/ns/docbook docbook.xsd">
<title>some title</title>
<para> some text.</para>
</article>
No comments:
Post a Comment