[wpkg-users] xsd, dtd schema files?

Jan Luehr wpkg-list at stephan.homeunix.net
Wed Apr 9 17:25:49 CEST 2008


Hello,

Am Mittwoch, 9. April 2008 schrieb Rainer Meier:
> Hello everybody,
>
> > Anyway I managed to do it and now I can build up my package definitions
> > by mouseclicks in Eclipse. All other XML files will not be that
> > difficult I guess. So stay tuned, I need some more time to complete and
> > test.
> >
> > I found that the XSD files could be a nice source for documentation as
> > well. By using Eclipse (or any other decent XML editor)
> > context-sensitive help and assistance is provided. I put lots of
> > comments and hints inside. So the XSD actually documents every element
> > and value within the packages.xml now.
> > I will do the same for all other XML files too.
>
> The hosts.xml and profiles.xml XSD files have not been very complicated
> (unless I forgot to add some important features *g*).

Looks nice!
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:
- Must a profile have at least one package? (I can think of profiles not 
having any packages, but depending on multiple profiles)
- 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?)
- 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?

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?

Keep smiling
yanosz



More information about the wpkg-users mailing list