Hi Jesper, Thank you for your interest, I am working for the design details and have start this implementation job, i will hold the code base and relative documents in Google Code web site soon, as this is really a huge project, hoping more guys are participate in this project together :-)
2011/4/18 Jesper Steen Møller <jes...@selskabet.org> > Hello Qi Wang > > I think this is a really good idea! > > I am one of the developers of the XPath2 engine at the Eclipse WTP project > (in fact I don't know much Xalan-J, actually I just contributed two Xalan-J > bug fixes which were never picked up) > > For the release this summer (Indigo), a new API has been introduced which > allows pluggable type models, and allows much better access to the XPath2 > engine without using internal packages. Also, the library uses a better > structure for separating the parsing and execution of the expression. Also, > we will now be JRE 1.4 compatible (sigh). > > Lots of improvements you can use there. > > However, "PsychoPath" (I hate that name) is still bound to using a Level 3 > DOM, and no, we do not have a streamy front end. The internal tree > implementation for Xalan would thus have to be wrapped for use with the > Eclipse XPath2 engine. But for type-sensitive template handling, this might > not be sufficient anyway. So you will face quite a number of challenges! > > Also, I hope you can do all this without having to fork the XPath2 engine, > since it is also used elsewhere, but we might be able to "semi fork" it and > work your changes back into the mainline for the next major release. > > As for how to work with the Xalan codebase, I cannot provide guidance on > your overall strategy, I think the Xalan-J people can guide you much better > there. > > Kind regards, > Jesper Steen Møller > > On 17/04/2011, at 16.43, Qi Wang wrote: > > Hi all, > > All Xalan developer and users, I wan to do something to push XSLT 2.0 > implemention job for Xalan, i know this topic was discussed in mail list for > many many times in recent years, so many guys are expecting it come true. > But due to low activity in Apache Xalan community, no committer to push this > thing, it is really very regretful. > > These days, i submited "Implement XSLT 2.0 and XPath 2.0 for Xalan" project > proposal as an GSoC[1] project. Now, i need your feedbacks to improve the > proposal, all the advises, suggestions are welcome :-) > > I am not a Xalan committer(alrough i dream to be), but if there is a > chance, i want to try my best to so something for XSLT 2.0 implemention job > for Xalan, many i can not finish all the job in the summer, but i will make > it is available, once wheels start turn, i thing there may be some other > guys can work together with me to finish this big project. Hoping all the > comunity can work together for the better future of Xalan. > > [1] http://socghop.appspot.com > > =========Proposal details of "Implement XSLT 2.0 and XPath 2.0 for > Xalan"================ > > Apache Xalan-Java is a powful XSLT processor for XML transforming based on > W3C recommendation XSL Transformations (XSLT) Version 1.0 and XML Path > Language (XPath) Version 1.0, XSL Transformations (XSLT) Version 2.0 > specification was published on 23 January 2007,this new version give us more > powful functions, new dat model and serialization etc. > > > > In my daily work, i use XSLT and XPath to parse XML and change XML document > to another format, i did this with Xalan.As we know,Xalan support XSLT > version 1.0 and XPath version 1.0 only.But my XML parse job is so complex, > and usually, i must use some XPath v2.0 functions to finish my parse job. > So, i encountered trouble. > > > > Then I Google keywords with Xalan and XSLT 2.0,i found many developers hope > that Xalan based XSLT 2.0 could become reality besides me. At the same time, > i discuss this topic with open source developers in mail list, so many guys > are interested in implementing complete XSTL 2.0 specification for Xalan. We > discuss this project deeply, and i got many good ideas and advises from the > discussion. And also they told me Xalan lost its most active contributors a > few years ago due to time demands from Real Jobs, and development slowed > down as a result,but they love to see Xalan tackle it.Due to XSLT 2.0 and > XPath 2.0 are large specifications that I imagine could take the developers > years to implement correctly,anyway it need some guy get the ball rolling, i > want to be this guy. > > > > Compared with XSLT 1.0, XSLT 2.0 and XPath 2.0 have some important new > characteristic. > > > > New features in XPath 2.0: > > 1. Sequences, in XPath2.0 everything is sequences > 2. For expression,in XPath 2.0,we can use for expression to iterator > every item in the sequence, compute expression value for each item, at last > return the sequence result by connect all the expression values. > 3. Condition expression, XPath 2.0's condition expression can be used to > compute different value on the basis of the condition's true or false value. > 4. Limited expression,limited expression in XPath 2.0 can be used to > judge that whether every item in the sequence satisfy appointed condition, > its value is always true of false. There are two kinds of limited > expression: some expression and every expression. > 5. Datatype,XPath 2.0's datetype is based on XML Schema, it supports all > the basic built-in datatype,such as xs:integer,xs:string and xs:date ect. > 6. Date and time, XSLT 1.0 has not date and time datatype, it must use > string to represent date and time. Due to XPath 2.0 system is based on XML > schema, so there is date and time data type in XPath 2.0. > 7. More functions support,XSLT 2.0 specification has more powful > functions definition.Functions in XPath 2.0 is defined in a special > recommedation "XQuery 1.0 and XPath 2.0 Functions and Operations", functions > in this recommendation specification belong to namespace " > http://www.w3.org/2005/xpath-functions", this namespace is bound with > prefix "fn". > > It includes these serveral types: > > * Constructor Functions > * Functions and Operators on Numerics > * Functions on Strings > * Functions on anyURI > * Functions and Operators on Boolean Values > * Functions and Operators on Durations, Dates and Times > * Functions Related to QNames > * Operators on base64Binary and hexBinary > * Operators on NOTATION > * Functions and Operators on Nodes > * Functions and Operators on Sequences > * Context Functions > > There are also many new features in XSLT 2.0: > > 1. Group, basic group syntax,group sort,group-adjacent and > group-starting-with etc. > 2. Connotive document node, or we can call it temporary tree > 3. Element result-document, we can use to generate multi output file in > XPath 2.0 > 4. Improvement of element value-of > 5. Char mapping,XSLT 2.0 supply more flexible solution for us to handler > specific characters in XML such as '<' and '&' > 6. Custom stylesheet function,in XSLT 2.0, we can use to create our own > functions in stylesheet > 7. Other new features. > > In order to implement all the XSLT 2.0 specification,it requires some > moderately basic data structure changes to track Schema types and to handle > Sequences which aren't simply nodesets,and also,i must implements all the > new functions defined in XSLT 2.0,fortunately,there is a open source XPath > 2.0 processor (http://wiki.eclipse.org/PsychoPathXPathProcessor) which is > at Eclipse.It is already being used by Xerces-J for XSD 1.1 Assertion > support.Why re-invent the wheel if we can leverage something that already > exists ? PsychoPath already is XML Schema Aware, leverages Xerces-J( > http://xerces.apache.org/xerces2-j) and passes about 99.9% of the Xpath > 2.0 test suite. It is currently undergoing testing against the the official > W3C Test Suite. > > > > So, in order to implement all the XSLT 2.0 specification for Xalan, there > are two steps: > > 1. Merge Xalan codes with PsychoPath codes,this will help us a lot,once > this job is done, Xalan has implemented all the XPath 2.0 features. There > are some issues to resolve during this merging process,for example: > * PsychoPath is not "streamy" yet, nor is Xalan, it is a big > challenge > * In PsychoPath,type informations is not part of current > interfaces,i will have to extend or replace the DTM interfaces to carry the > additional data > * XSLTC fit in problem. XSLTC runs against the same data model > interfaces (DTM), and In Theory implementing compilation should just be a > matter of generating code equivalent to what the interpreter is doing. In > practice, it's a lot of detail work. > 2. Implement all the other XSLT 2.0 features which were described before > for Xalan. > > In my plan, i will hold the whole XSLT 2.0 implemention project as a long > term open source project under Apache, do it step by step, may be as a GSoC > project,i can only implement a subset of this capability i was thinking of > working on,at lease, i will finish the following tasks: > > 1. Merge Xalan codes with PsychoPath codes, i will do this first, but > this is not a simple task,may be it will cost me one month or even more to > merge it correctly. > 2. Resolve merge problems between Xalan and PsychoPath > 3. Implement XSLT 2.0 Group feature for Xalan > 4. Implement XSLT 2.0 temporary tree feature for Xalan > 5. Implement Element result-document feature for Xalan > > If everything goes well and i have enough time,i will do my best to do more > job. After the summer, i will continue with this project,try to submit my > codes to Xalan as proposed changes and try to become one of Apache > committers,this is my dream.And i know this is a huge project,but where > there is a will there is a success, I love open source, i will do my best to > improve it through my attemp and ability. > > > Regards > > Victor Wang > > >