[wpkg-users] xsd, dtd schema files?

Rainer Meier r.meier at wpkg.org
Wed Apr 9 18:40:56 CEST 2008


Hi Jan,

> Looks nice!

Thanks. It's still a "fist draft" ;-)


> Btw. a few things drew my attention:
> - You defined "variable" multiple times. Maybe it might be better to define 
> these common things only one time and include 'em.
> profilex.xsd:

Well, I will check if that makes sense. I don't know if this will bring 
any noticeable benefit at the moment.


> - Must a profile have at least one package? (I can think of profiles not 
> having any packages, but depending on multiple profiles)

Right, I even did not think about this possibility. However in most 
cases there will be at least one package - that's why I put it like 
this. I changed it to allow 0 packages as well.


> - Multiple depends-(and package) children referecing same ids are possible - 
> although this doesn't strictly lead to a broken XML-file, it is propably an 
> error. (Declare as invalid?)

For WPKG it is perfectly acceptable to reference a single package 
multiple times - or even "included" through depending profiles. So no 
need to check that explicitly I think.


> - You define <xsd:complexType name="variable">and <xsd:element name="variable" 
> type="variable"> but I can't find any references to them within "profiles". 
> Is this allright?

No. In fact it's referenced within the "profile" element. It allows to 
specify any number of variable elements.


> Btw. ehm ... imho it's a little bit odd, that profiles, hosts and packages use 
> different XML-Files and therefore idrefs cannot be validated. 
> This could by accomplished by either
> - Patch wpkg not to panic on missing xml-files and using already loaded tree 
> data
> - Write a simple xslt transformation for splitting and joining these files.
> 
> What do you think?

Probably yes. As I said, it's my very first experience in XSD and it has 
been developed in quite a hurry during some night hours. So let me think 
about it and let's do one step after the other...


br,
Rainer



More information about the wpkg-users mailing list