[OpenAFS-devel] Patch for XML switch for vos examine

Simon Wilkinson sxw@inf.ed.ac.uk
Mon, 19 Apr 2010 15:24:53 +0100


On 19 Apr 2010, at 14:54, Jeffrey Altman wrote:

> I would wrap this blob with
>
> <cell name="cellname">

Structurally, this would be the place to include cell information.  
However, none of the existing tools output cell information, and  
practically it gets in the way. If I run multiple vos examines, and  
try to just concatenate the output together, I end up with multiple  
cell blocks, which just doesn't make any sense.

>> <volume name="root.cell">
>>        <id>536870915</id>
>
> I would either include the <id> as part of
>
> <volume name="root.cell" id="536870915>
>
> or
>
> <volume>
>   <name>root.cell</name>
>   <id>536870915</id>
>
> Probably the latter

 From the perspective of efficient parsing, the latter is preferable.  
However, I think the former makes it easier to construct XPath  
queries. Horse for courses, I guess.

> By itself this XML fragment looks fine.  The question is whether it is
> sufficient for parsing.  There may need to be a standard <xml>... </ 
> xml>
> header as well as a DTD.

There's no requirement for either in the XML specification, so  
omitting them should be fine. In fact, it's in our interests to do so,  
as it makes to much easier to use 'vos' to produce fragments of output  
for inclusion in larger XML documents. (In any case, the 'standard'  
XML header is <?xml version="1.0"?>, with no trailing element, not  
<xml></xml>)

Cheers,

Simon.