A user account is required in order to edit this wiki, but we've had to disable public user registrations due to spam.
To request an account, ask an autoconfirmed user on Chat (such as one of these permanent autoconfirmed members).
Extensions: Difference between revisions
Jump to navigation
Jump to search
(New page: = Ways to arbitrarily extend text/html for new vocabularies = Please put ideas for what it should look like here. Each example should explain in details (ideally with examples) how to ha...) |
No edit summary |
||
Line 1: | Line 1: | ||
= Ways to arbitrarily extend text/html for new vocabularies = | = Ways to arbitrarily extend text/html for new vocabularies = | ||
Please put ideas for what it should look like here. | Please put ideas for what it should look like here, each in their own section. | ||
Each example should explain in details (ideally with examples) how to handle: | Each example should explain in details (ideally with examples) how to handle: | ||
Line 7: | Line 7: | ||
* Existing content that happens to use elements or syntax that you are proposing have special processing rules. | * Existing content that happens to use elements or syntax that you are proposing have special processing rules. | ||
* Pages that contain any special syntax after that syntax was copied and pasted by an ignorant Web author from a valid page written by a competent Web author aware of the new syntax. | * Pages that contain any special syntax after that syntax was copied and pasted by an ignorant Web author from a valid page written by a competent Web author aware of the new syntax. | ||
== Proposal 1: xmlns strawman == | |||
When you hit an element with an xmlns="" attribute, switch to an XML parser until that parser has parsed the matching end tag. | |||
<pre> | |||
bla bla text/html bla bla <foo xmlns="http://example.com/foo"><this><must/>be<valid>XML! </valid></this> must be.</foo> bla bla text/html | |||
</pre> | |||
Errors cause the entire page to stop parsing. | |||
Existing pages are not handled. | |||
Pages that copy-and-paste this syntax then use it incorrectly are not handled. | |||
=== Reasons why we can't do this === | |||
* There are pages that already specify xmlns="" attributes that would break if the content were processed as XML. For example, [http://www.live.com/]. |
Revision as of 01:28, 2 April 2008
Ways to arbitrarily extend text/html for new vocabularies
Please put ideas for what it should look like here, each in their own section.
Each example should explain in details (ideally with examples) how to handle:
- Syntax errors at the tokeniser level, the tree construction level, and the schema level.
- Existing content that happens to use elements or syntax that you are proposing have special processing rules.
- Pages that contain any special syntax after that syntax was copied and pasted by an ignorant Web author from a valid page written by a competent Web author aware of the new syntax.
Proposal 1: xmlns strawman
When you hit an element with an xmlns="" attribute, switch to an XML parser until that parser has parsed the matching end tag.
bla bla text/html bla bla <foo xmlns="http://example.com/foo"><this><must/>be<valid>XML! </valid></this> must be.</foo> bla bla text/html
Errors cause the entire page to stop parsing.
Existing pages are not handled.
Pages that copy-and-paste this syntax then use it incorrectly are not handled.
Reasons why we can't do this
- There are pages that already specify xmlns="" attributes that would break if the content were processed as XML. For example, [1].