XML is whitespace sensitive in some grammar productions.

Open
#233 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
javascript
Domain
tooling

Research direction

Start by reading the @xml-tools/parser handling for the XML start-tag and attribute Eq cases described in the W3C XML specification. Check how whitespace is currently reported, then ensure redundant whitespace produces a custom syntax error without interrupting fault-tolerant parsing; done means both cases expose the expected errors while parsing continues.

Written by the indexing model from the issue text.

Description

Parser

Apparently whitespace cannot be freely used everywhere, examples:

So @xml-tools/parser is not exposing the correct syntax errors in this case.
But on the other hand this parser is fault tolerant and should be able to handle small syntax errors
such as these transparently.

The solution would likely be to manually perform checks for redundant during parsing.
and save a custom syntax error message if such WS was encountered.
These syntax errors should not affect the regular parsing flow.

Dominant language
JavaScript
Stars
59
Forks
24
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from SAP/xml-tools

All issues in SAP/xml-tools

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.