Hi JS,

On Thu, Jan 7, 2010 at 6:53 PM, Jean-Sébastien Guay
<[email protected]> wrote:
> But your case caused a problem on writing, in that I hadn't considered the
> contents at all. In other words, any tag that didn't have children was
> written back out with the <tag ... /> syntax (even if the contents string
> was not empty). .
> ....
>  This is fixed in the attached file, so now it will be written the same way
> as it was read. The slash in that case does not matter at all.

Thanks, fix looks good, now merged and submitted to svn/trunk.  One
little tweak, to fix a warning I've added a () around the if ||'s in
the line:

   if ((c=input[0])>=0 && (c=='>' || c=='/')

I presume this is appropriate.

>
>>  In the case of NODE one would typically have it without any children,
>> but if users add them then they should also change the type of GROUP
>> to be consistent.
>
> But if there isn't any checking of this, perhaps we should use exactly the
> same code for both NODE and GROUP on writing?
>
>    case(NODE):
>    case(GROUP):
>        // ...
>
> Because right now my changes apply only to NODE. So if the user created a
> node of type group, that has no children and no contents, it will be written
> as before:
>
> <tag ... ></tag>
>
> On second thought, maybe that's desirable. What do you think?

I would have though this is OK as is.  If you want a xml tag to
written out in the short form then you wouldn't be using a GROUP, just
a NODE or an ATOM.  I've just review the writing out of the ATOM and
found out that it was missing the trailing /> so I've just added this
and checked it in.

Robert.
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to