Comments (9)
I've made a little parser in JavaScript. It's not finished yet.
http://github.com/m93a/nml-parser
EDIT: Updating to 1.1.0, now it can export DOMDocument.
It's just a parser but it can be used:
- to make a html6-html5 convertor
- as a node.js html6 module
- in a browser extension for html6 compatibility
- to use NML in ajax, instead of XML
- to make your disk 20kB smaller
- and much more...
from html6.
Looks really cool. Hope to see more :)
from html6.
But before html6-html5 convertor, we need a CSS parser. And maybe a JS framework.
from html6.
Why do we need a CSS parser? CSS works fine with XML. And why a whole framework?
from html6.
OK, we can use xhtml with both html
and form
namespace prefixes set to http://www.w3.org/1999/xhtml
. There is just a problem with splitting media
tag to img
, video
and audio
.
We have to:
- rewrite all the CSS selectors (
media -> img, video, audio
and#foo -> [id=foo]
) - make
document.getElementsByTagNameNS('media',"http://www.w3.org/1999/xhtml");
select img, video and audio
Oh and also there's a problem with programmatically creating elements with ns prefix. That's impossible!
This comment was editted 5 times.
from html6.
CSS selectors need to be general and work across XML. CSS doesn't have predefined elements you can select for example. You can style those elements fine right now: http://jsbin.com/iCuDEYE/2/edit
The only thing I can think of is adding 1 selector to make html\:foo
a little nicer to write. I'm not sure what you mean by your 2nd example of the ID.
The JS thing should just be part of the polyfill.
from html6.
I don't mean creating a new spec - our problem is that all media
tags will be replaced by a) img
b) audio
or c) video
tag so your styles won't match any element. I don't see any way to make media
tag work without changing DOM. That means that the convertor has to change every html:media to img, video or audio.
And the second problem with css is that #foo
doesn't work with xml (in all modern browsers - that means all the browsers but MSIE).
Do you understand?
EDIT: Oops, to fast reading. I thought you said that CSS works across all the XML. My fault, correcting the comment.
from html6.
I've just found an alternative way
- Leave
html:media
unchanged - Add a tag like
abc:xyz
at the end of the body element - Choose the type of media tag (image, video or audio)
- Create image, video or audio tag as a child of
abc:xyz
- Make the video/audio/image tag cover the media using javascript and css absolute position
Pros:
- no css modifications needed
- no JS framework needed
Cons:
- not a valid xHTML
abc:xyz
can be still detected using JavaScript- media's computed styles have to be checked every hunderth of a second (not exactly :D)
- no animation and transition support
from html6.
After a short break (not even a year), I've got a new update!
HTML6 Polyfill Beta can be found at m93a/nml-polyfill.
from html6.
Related Issues (20)
- Creating links with attribute
- A more orthogonal HTML HOT 9
- Missing source element
- Why html:button element?
- HTML-6 looks ugly. Uglier than HTML-5 HOT 15
- Tags should be closed in html6 HOT 2
- Why? HOT 1
- No CSS pseudo class selector support HOT 2
- Web Components HOT 3
- Standardize on the default namespace of 'html' and use it in all your examples HOT 3
- Current CSS spec does not account for this tag selector syntax HOT 1
- Attribute Quotes should be required and we should either pick Double Quotes or Single as a standard HOT 5
- Microformats and html6 semantic again
- use role="a", role="text" to display a link, input:text HOT 2
- It should be some another ways to improve the web. HOT 1
- Lol, worse syntax I've ever seen. HOT 4
- Lol, the author here is such a whiny little kid. HOT 1
- Html6 HOT 1
- Idea HOT 2
- Fix HTML6
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 html6.