There is no way to determine where a quoted attribute ends in advance.
We will assume that the quoted attribute is discarded
- a new line
- at the beginning of another quoted attribute
That is
1. Example
-------------------------------------
<tag attr="several words [NEWLINE]
value"
-------------------------------------
will be parsed to:
tag
attr
several
words [NEWLINE] value
2. Example
-------------------------------------
<tag1 attr="several> <tag2 attr2="value"/>
-------------------------------------
will be parsed to:
tag1
attr
several
tag2
attr
value
That means that we have to start parsing the value of quoted attribute as if it is a regular HTML markup, if one of two mentioned above situations occures. If none of them occures until we reach a closing quote we have to treat all the read text as a value of the quoted attribute.