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

Add support for namespaced elements with nsxml #41

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

bancek
Copy link

@bancek bancek commented Nov 22, 2021

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

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

Successfully merging this pull request may close these issues.

ego confused by 'bulletproof button'
1 participant