Boost logo

Boost :

From: Robert Ramey (ramey_at_[hidden])
Date: 2006-06-22 23:24:51


Jared McIntyre wrote:

> The first item involves style sheets (and potentially other similar
> tags). Currently there is no way to insert <?xml-stylesheet
> type="text/xsl" href="file.xslt" ?> into the file from code. And if I
> do it manually, serializer won't be able to load the file.

Hmm - I'm not sure about that. If I remember correctly, unrecognized
attributes are ignored.

> Is there
> any interest out there in this kind of functionality (adding tags
> like this from code, and ignoring such tags on load)? If so, could
> someone point me to where to look in the code to put together a
> prototype?

Look at basic_xml_[i/o]archive and xml_[i/o] archive. You can either
derive from these or make your own versions.

> Their thinking is that if the old code loads the file, it should just
> ignore the <material> tag and load happily. However, in order of the
> new code to read the old file, the version has to be revved to 1 so
> that it knows to add a <material> value on load. In doing that
> version rev, even if it could ignore the <material> tag, the old code
> would see that version 1 and assume it didn't know how to load it.
> Can anyone think of a way around this short of changing the version
> scheme, which doesn't seem like an option.

It seems to me that the same effect could be obtained more simple
by just having your archive class skip over tagged items that don't match
the next one to be serialized.

Robert Ramey


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk