[GCC-XML]New cv-qualified type referencing scheme

Brad King brad.king at kitware.com
Fri Oct 17 10:22:56 EDT 2003


On Fri, 17 Oct 2003, Tony Cook wrote:

> Could the same be done with the location attribute (e.g.
> location="f0:305"). That too violates the ID/IDREF spec when linking to
> <File id="f0" ... /> though this might cause an explosion of
> intermediate tags if you use your approach!
>
> <QualifiedLocation id="f0:305" file="f0" line="305" />
>
> Lots of <QualifiedLocation ... /> tags will appear. Would an alternative
> solution be to add two additional attributes to all elements supporting
> the location attribute. E.g.

Fixing thd ID/IDREF problem for this case is probably a good idea. I agree
that this would cause an explosion of elements.  It would effectively
double the total number of element dumped because almost every declaration
has its own line number.  This is not acceptable.

> <...... location="f0:305" file="f0" line="305"/>
>
> So here 'file' is now the nominated IDREF. In my case this addition
> would not affect my XSLT stylesheets, though it might affect other
> parsers that barf on unexpected attributes ... thoughts?

There is one function that dumps the location attribute.  It should be
pretty easy to change it to dump what you suggest.  Unlike the type
change, this change will duplicate information in order to maintain
backward compatibility.  It is probably an acceptable compromise, though.
I'll implement this change when I get a chance unless someone suggests a
better approach.

Thanks,
-Brad




More information about the gccxml mailing list