DTD for repomd.xml

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I created DTD file for repomd.xml. It is available at:
 http://miroslav.suchy.cz/spacewalk/repomd.dtd

Using this file you can validate whether you repomd.xml file is valid.

There is two way (at least) how to validate repomd.xml.

a) since repomd.xml do not have DOCTYPE element you can insert it there:
e.g.:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE repomd PUBLIC "-//Red Hat//repomd.xml DTD 1.0//EN" "http://miroslav.suchy.cz/spacewalk/repomd.dtd";>
<repomd>
...
And then run:
xmllint --loaddtd --noout --valid /tmp/repomd.xml

This way you did not get any error (assuming you repomd.xml file is valid)

b) run:
$ wget http://miroslav.suchy.cz/spacewalk/repomd.dtd
$ xmllint --noout --valid --dtdvalid file:///home/msuchy/repomd.dtd /tmp/repomd.xml

But this way you get one error, which is safe to ignore (for now):
/tmp/repomd.xml:2: validity error : Validation failed: no DTD found !
<repomd>
       ^


I created this DTD according to my study of RHEL5 and F12 repomd.xml file and quick study of yum code source. If you think I missed some allowed element or attribute or if you see some error in DTD (it is my first) feel free to comment it.

I would like to start discussion if FPI I suggested is appropriate. And even find better home url for this document other then my homepage.

If you find this usefull I can continue with creating DTD for other xmlfiles like filelists.xml and primary.xml.

Comments?

--
Miroslav Suchy
Red Hat Satellite Engineering
_______________________________________________
Yum mailing list
Yum@xxxxxxxxxxxxxxxxx
http://lists.baseurl.org/mailman/listinfo/yum

[Index of Archives]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux