> + if (tree->span) {
> + prop = xmlSetProp(elem, (xmlChar*) "file",
> + (xmlChar*) tree->span->filename->str);
Like I said on IRC, I currently use tree->span to retrieve the file
name. As a result:
1) The "file" nodes are only added when SPAN is activated ;
2) All the file subnodes get a "file" attribute since span returns
filename for all subnodes.
I'm thinking of making a static char tree_filename(const tree *tree)
function to retrieve the filename (or NULL otherwise). As we
discussed, the easiest way is probably to look at /augeas/files, but
then I need to pass the struct augeas all along, since I would call
tree_filename in to_xml_one. Is there a way to achieve this without
passing the augeas structure along the way?
Raphaël
_______________________________________________
augeas-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/augeas-devel