Code Monkey home page Code Monkey logo

fleur's People

Contributors

alaincouthures avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

fleur's Issues

Revive E4X

Xqib. I am a novice programmer who fell in love with ECMAScript, and XML. I feel in love with xml after I found xqib. I was and still am zeal about it that I push myself to learn xml, xslt, schema(and out of respect DTD).

I am currently trying to accomplish two things:

One: revive of e4x

Two: revive of xqib

My proposal for e4x:

An interface point of view(short and simple)

Change spec name to EDPQO(ECMAScript's DOM Parser & Query Object)

EDPO acting as a internal representation of the DOM in an ESON(JSON) format

All communication with this representation via ESON(JSON) syntax

Scrap everything but the methods and properties.

Change the XML(); object name to DOM(); to indicate that it's for XML, HTML, XHTML, XSLT, Schema, and the likes(anything that's is base XML.

A reference interface object; allowing communication with the document object model through a shallow copy of it via ESON(JSON) syntax:

var doc = DOM();

Doc.load(note.xml);
Doc.load(page.html);
Doc.load(page.xhtml);
Doc.load(pageschema.xsd);
Doc.load(pagetransform.xslt);

All access possible via ESON(JSON) syntax.

Allow xPath 1.0 support through the method:
xPath(/expression/);
To use xPath expression to nevigate through the DOM object.

Example: doc.xPath("/html/body/p");

Remove support for native element via <></>

For example:

XML file to be use:

2002-08-01
Tove
Jani
Reminder

Don't forget me this weekend!

Example:
E4X spec.
var Doc=new DOM();
Doc.load("note.xml");

ESON syntax:

console.log(Doc.body);

Along with ESON(JSON) syntax, allow for added method of Number, String, Array, Object, RegRxp. Since data type are automatically wrapped, they should be NO complication of allowing this.

A display of a few methods:

This /"/note/body"/ is within body element as the last child, after the textNode:

Doc[4].body.ps = "also, don't forget to bring a jacket";

note that body is an object, as note is am array of elements that cannot hold node text. The body.ps adds a new element to body: "Also, don't forget to bring a jacket!":

Don't forget me this weekend! "Also, don't forget to bring a jacket!"

This /"/note/"/ is after body element:
Doc[Doc.length ].concat("also, don't forget to bring a jacket");

Don't forget me this weekend! "Also, don't forget to bring a jacket!"

This /"/note/"/ is before body element (note: index 4 is note's child heading element)

The following example is the same as:
var note = ["date","to","from","heading","body"];
note.splice(4,0,"ps");
note;//output: ["date","to","from","heading","ps","body"];

xmlDoc.splice(4, 0 , "also, don't forget to bring a jacket");

xPath 1.0 for the xPath(); method

With attribute, I say to use the xPath(/expression/); method to retrieve that via string:

2002-08-01

Doc.xPath("/note/date/@attr");
//xPath 1.0 spec
);

Via ESON syntax:

/as the attribute node(object) is a child of the date node(object); it stand to reason that it is also a object within the date object that can only hold text/

Doc[0].date[0].attr"; //"value"

For xqib, please look at this site:

http://www.xqib.org/index.php

The old e4x program is already written, just need to be extracted to adopt. Mirth connect is an open source that have the e4x still apart of their software.

My apologies for and mistake.

Thank you for reading.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.