[Home]  [List]  [News]  [Docs]  [FAQ]  [Downloads]  [Resources]  [About]
Search :
/Home /List

list4xt : Mailing list for the XT users community.

[list4xt] Re: Extensions to XT

Subject: [list4xt] Re: Extensions to XT

User: Website

From: Paul T (pault12345@yahoo.com)
Date: 23/06/2000 - 22:33


 

  Khun Yee Fung <KFung@extend.com> wrote:

2. And the extension functions (how to get to them) are hardcoded in
com/jclark/xsl/tr/SheetImpl.java

Hmmm... Do you think it is worth the effort to parameterize this file first?
Like putting the strings, etc. into an XML file (class names, so that
inflextion can be used (of course efficiency will suffer...)), or
something...

# You'l have to parametrize all of 3 layers. ( 1 and 2 located in SheepImpl, but the Actions are kind of byte-code ... ) Parametrizing all of those layers looks doable, but you should be very brave person to try that without experimenting with 2-3 complex custom extension elements first. Anyway the task of 'plug&play' extension elements looks hard. By the way , after (if) you invent the automata for 'plug&play' elements then you could rewrite the standard XSLT elements to use the same automata ;-). Current behaviour of XT is that extension elements are 'the same' with XSLT elements. That means, because for XSLT elements the syntax / semantics is hardcoded - the same is with extension elements)

<quote>

The following features of the XSLT PR are not yet implemented:

   the element extension mechanism (the extension-element-prefixes and xsl:extension-element-prefixes attributes, the xsl:fallback element, and the element-available function)

</quote>

I think implementing the automata for plug&play extension elements could be very cool thing, but because I can ( and I try to) live without extension elements at all, I have very messy feelings on extension elements. BTW - I still don't understand why you need to base something on extension elements ? For example, I would say for self-documentation : just use comments and place XML inside of comments ;-)

# Conclusion.

1. Create Parser for your element. ( see

     class DocumentParser implements ActionParser {
        .......
     }

     The purpose of this Parser will be to 'translate' the
     'context' into appropriate 'action'(s).

     
 2. Attach Parser to the particular element : see

     SheetImpl constructor does it.
     actionTable.put(xt("document"), new DocumentParser());

 3. Implement your own action for new element:

     class DocumentAction implements Action {
    }

---------------------------------
Do You Yahoo!?
Get Yahoo! Mail - Free email you can access from anywhere!

--
Mailing list for the XT users community.     (http://elainesbooks.com)
(mailto:list4xt-request@4xt.org?Subject=unsubscribe to unsubscribe)



Archive générée par hypermail 2b28 le 01/06/2001 - 09:01 CEST

webmaster@4xt.org