[xsd-users] xlink href use of idref class
Laurence Davies
laurence.davies at unsw.edu.au
Fri Sep 4 19:20:16 EDT 2015
> > color_t& color = ... // reference to an object containing href
> > xml_schema::idref ref (href, 0, &color);
> >
> > The `color` element is a "reference to an object containing href". Does
> > this mean that color is a _type object which contains a tree of children,
> > one of which containing a _tree object with ID==href?
>
> Yes, that's correct.
In that case, in the streaming example would this tree of children (stored in map_?) be complete? I see in the idref::get() method it performs root_()->lookup() which would assume that the correct root container can be referenced in root_() and that lookup() can find the matching ID element from map_. Considering that in the streaming code the type_ objects are often discarded, would keeping a "shell" of the root element solve this problem? Or do I need to have the complete tree in memory for it to work correctly?
Thank you and regards,
Laurence
Laurence Davies
____________________
Research Assistant in eGeodesy
CRC-SI, UNSW
Desk phone: (03) 8636 2373
Mobile: 0427 519 289
________________________________________
From: Boris Kolpackov [boris at codesynthesis.com]
Sent: Saturday, 5 September 2015 1:02 AM
To: Laurence Davies
Cc: xsd-users at codesynthesis.com
Subject: Re: [xsd-users] xlink href use of idref class
Hi Laurence,
Laurence Davies <laurence.davies at unsw.edu.au> writes:
> color_t& color = ... // reference to an object containing href
> xml_schema::idref ref (href, 0, &color);
>
> The `color` element is a "reference to an object containing href". Does
> this mean that color is a _type object which contains a tree of children,
> one of which containing a _tree object with ID==href?
Yes, that's correct.
More information about the xsd-users
mailing list