ego icon indicating copy to clipboard operation
ego copied to clipboard

Add support for namespaced elements with nsxml

Open bancek opened this issue 4 years ago • 0 comments

Add support for XMLNS.

Scanner now checks the attributes in ComponentStartBlock and if the attribute has xmlns: it adds the namespace to ComponentStartBlock.XMLNS.

The parser checks if the current ComponentStartBlock.Package is in xmlns and rescans (ignoring the components and attribute blocks) and parses the ComponentStartBlock range. It cannot just convert the range to TextBlock because the attributes can contain PrintBlocks.

<v:rect xmlns:v="urn:schemas-microsoft-com:vml" href="<%= link %>">
  <ego:Component foo=true />
</v:rect>

xmlns needs to be passed recursively while parsing because only the root tag has xmlns attribute.

<v:rect xmlns:v="urn:schemas-microsoft-com:vml">
  <v:stroke linestyle="thinthin">
    <ego:Component foo=true />
  </v:stroke>
</v:rect>

Closes #36

bancek avatar Nov 22 '21 14:11 bancek