snaekobbi / pipeline-mod-braille

ARCHIVED. Please don't make any new issues or pull requests in this repo.
0 stars 0 forks source link

Support type and attribute selectors with namespace prefix #11

Closed bertfrees closed 8 years ago

bertfrees commented 9 years ago

Example:

[epub|type="..."] {
  ...
}

See

bertfrees commented 8 years ago

Another use case is [xml|space=preserve] { ... }, see https://github.com/snaekobbi/sprints/issues/117 and https://github.com/daisy/pipeline-mod-braille/issues/53.

bertfrees commented 8 years ago

Another use case is [brl|class=foo] { ... }. Question: should it be possible to match this with .foo instead?

bertfrees commented 8 years ago

Question: should it be possible to match this with .foo instead?

The answer is no, see http://www.w3.org/TR/css3-selectors/#attrnmsp: [attr] == [|attr]

bertfrees commented 8 years ago

See commits https://github.com/snaekobbi/jStyleParser/compare/68564274a72d31416f360de7217e52313ce543d0...7c587629f5b70f61a46df121aeff5ff3d2ce783c

dkager commented 8 years ago

Awesome! And I just realized it uses ANTLR which I had been meaning to have a brief look at anyway. I will happily test my use case (xml|space) whenever you want.