Comments (5)
All the tags are looked up in the schema in a case-insensitive manner: <HW>
and <hw>
are validated in exactly the same way, as if they were both <HW>
tags. The nesting validator does all tag name comparisons in lowercase. SGML and XML output happens in the original case.
Is there any other part of the system that needs to case-insensitive?
from isetools.
Okay sounds good; I wasn't sure if this was the case already or not!
Is there any code/commenting that makes it clear that this is how tags should be handled? TagNode
has a case-preserving get/setName, so it would be easy to forget to use .toLowerCase()
when it mattered.
Case in point, TagNode
itself seems to have forgotten about this detail in .setName()
. I don't know if there are any other cases elsewhere...
from isetools.
That's a very good point.
There are few places in DOM where that happens as well, mostly with respect to indexing the nodes and calculating act.scene.line stuff.
In the mean time, I've switched the schema and tag classes to use a case-insensitive data structure, and written a new one for tag attributes.
But there isn't really a good way to do case-insensitive and case-preserving tag names - we'll just need to be ever vigilant.
from isetools.
Not sure why it isn't showing up, but the code i just mentioned is in branch issue-13, commit ce6c0c9
from isetools.
Merged the issue-13 branch, which should fix all this. If it doesn't, please file another issue.
from isetools.
Related Issues (20)
- Feature: validator to check FOREIGN/@lang codes HOT 4
- Feature: warn about missing main content HOT 3
- Feature: validate section coverage HOT 2
- digraphs are ligatures HOT 3
- unify "typeform" handling HOT 5
- ellipsis HOT 1
- TagNode text is missing whitespace HOT 3
- One sp per s.
- Feature: validator(s) to check ID uniqueness HOT 1
- log warning for duplicate attributes
- Attribute line numbers
- marg handled incorrectly in XMLWriter HOT 1
- missing `lig` and `typeform` tags in XMLWriter output HOT 1
- require indent/rule/space lengths to be non-zero
- only one front/backmatter HOT 2
- transformers should log their changes
- Log doesn't play well with multi-threading HOT 2
- validate DOM using "location" subset schema
- only allow "part" attribute in modern
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from isetools.