[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Well formed HTML5

  • From: L2L 2L <emanuelallen@hotmail.com>
  • To: William Velasquez <wvelasquez@visiontecnologica.com>
  • Date: Tue, 15 Jul 2014 19:02:11 -0400

Re:  Well formed HTML5


On Jul 15, 2014, at 6:49 PM, "William Velasquez" <wvelasquez@visiontecnologica.com> wrote:

Hi XML Geeks,

 

The rise of HTML5 is raising practical problems for XML developers that want to embrace it, mainly by the need of delivering “nice” user interfaces and take advantage of convenient features, like Web Components, but in the other hand, handle HTML5 as trees, to do things like storing it on XML Databases.

 

This is not a proposal, is just a re-post of a dichotomy aroused in the eXist-db mailing list: how to parse non well-formed HTML5  created by no-xml aware developers (like third party libraries), with the aim of hearing your opinions about a possible solution (could it be <?xml version=”1.2”?>).

 

The main issues of contention are these three:

 

1.       Empty attributes (widely used in HTML5 like disabled become disabled="disabled" in XML)

2.       Script friendly handling of ampersand and angle brackets (Programmers don’t like to escape them when writing code).

3.       Empty elements no closed (like <link > instead of <link />)

 

I want to hear your solutions, but I’ll also suggest these in my ignorance:

1.       Allow empty attributes in well-formed XML

2.       Allow non-escaped ampersands and angle brackets when enclosed in a parenthesis expression.

3.       Propose a gentlemen's agreement to xml-haters and convince them of the desirability of a single / before closing an empty element.

 

As usual, we will be happy to read the enlighten opinions shared here,

 

 

 

William David Velásquez

Director de Investigación y Desarrollo

Visión Tecnológica S.A.S.

www.visiontecnologica.com

Tel (57 4) 444 7292

Movil (57) 311 709 8421

Follow me @williamda

 


1.       Allow empty attributes in well-formed XML

2.       Allow non-escaped ampersands and angle brackets when enclosed in a parenthesis expression.

3.       Propose a gentlemen's agreement to xml-haters and convince them of the desirability ofa single / before closing an empty element.


I rather not change the xml-developer way. But instead have a _javascript_(or by any other  code) handle these issues for <?xml version="1.2" encoding="UTF-8"?>


"use strict"; 
var j = 0, baz = "", k = "", bar = 
"83,104,101,108,108,101,121,32,80,111,119,101,114,115,39,32,98,111,111,107,115,32,97,114,101,32,116,111,32,114,101,97,100,32,102,111,114,";

for(;bar.charAt(j);){ 
    if(bar.charAt(j) !== ","){
        k += bar.charAt(j); } else{ baz += String.fromCharCode(k)+" \v"; k = "";
    }
    j++; 
console.dir(baz);


  • References:

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.