Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Element parser throwing errors for xlinks #52

Open
shehzan10 opened this issue Nov 27, 2018 · 0 comments
Open

Element parser throwing errors for xlinks #52

shehzan10 opened this issue Nov 27, 2018 · 0 comments

Comments

@shehzan10
Copy link
Contributor

I have data that contains a cityobject like:

<gml:solidMember>
  <gml:Solid>
    <gml:exterior xlink:href='#otherobject'>
    </gml:exterior>
  </gml:Solid>
</gml:solidMember>

Looks like this causes it to run

if (!m_boundElement.valid()) {
// This might happen if an container element that usally contains a child element links to an exting object using XLink an thus
// uses a combined start/end element: e.g.: <surfaceMember xlink:href="#..."/>
// For such elements a child parser must only be created if there is no xlink attribute.
CITYGML_LOG_ERROR(m_logger, "CityGMLElementParser::endElement called on unbound " << elementParserName() << " object for element <" << node << "> at " << getDocumentLocation());
throw std::runtime_error("CityGMLElementParser::endElement called on unbound CityGMLElementParser object.");
}

While I understand why it's going into this condition, I'm not completely sure why it has to throw an unrecoverable error. Isn't there a different path it can take?

Or is it because xlink is not supported?

If I wanted to work on this, what is the workaround for this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant