You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by John Gentilin <ge...@eyecatching.com> on 2004/02/19 18:00:01 UTC

Help, Ext Elements and core Xalan issues

The Problem:

I need a way to run a transformation, that contains extension elements,
then after the transformation have the ability to re-execute, selectively
some of the templates. i.e. the equivalent of a call-template where
I supply the Source Node and the template name.

The Task:
I am developing a plugin for Eclipse, destined to be Open Sourced,
that will take 1 XML (data / configuration) file and 1 or more XSL
files to create a Multipage / Manifest style editor where the XSL
files will describe a form based on the content of the XML. As the
form is created, the source node is stored along with the widget so
that the source document will be updated in place. When the form
is modified, and you jump to the source editor, the document is 
serialized into the source editor, if the source editor is modified,
its contents will be parsed and the form will be updated.

The idea is to provide a platform to easily create a Project 
Configuration file editors without a lot of Widget / DOM programming.
I have included some samples below.

Currently the foundation seems to be working well, I can create a
form and place widgets on it and edit content in both directions.
The model that is bugging me now is when you have a left side list,
and the right side edits the details of the selected list item.
When a list item is selected, I want to re-run the templates
responsible for producing the right side fields so that they
can query the Selected index of the List to be used as qualifier
in the select statement.

If this sounds interesting to anyone, I can create a SourceForge
project if you want to get involved.

The Sample:

The following XSL will produce a page in a MultiPage editor that
consists of a SWT Group that contains a single text field. This
text field will be populate with an Element of the XML source
document. If you edit the text field then jump to the source
editor, the source XML will reflect the change.

The Form:
<xsl:template match="/" >
   <xfe:layoutSpec name="basic-grid" num-columns="3" />

   <xfe:form layout-class="xfef:layout.xfeFill" name="mainForm">

     <xfe:container class="xfef:container.xfeGroup" style="border"
        layout-class="xfef:layout.xfeGrid" name="mainGroup"
        layout-spec="basic-grid">

       <xfe:parameter
            method="setText"
            select="'Edit Command Definitions'" />
       <xfe:parameter
            method="setBackground" select="'white'" />

       <xfe:widget
            class="xfef:widget.xfeText"
            name="EditField" style="border"
           select="/data/item[3]/FirstName" />

     </xfe:container>
   </xfe:form>

</xsl:template>

The Data:
<data>
  <item name = "John Ca">
    <FirstName>John</FirstName>
    <LastName>Gentilin</LastName>
    <Address>
     <Street>xxxx</Street>
     <City>xxx</City>
     <State>Ca</State>
     <Zip>94546</Zip>
    </Address>
   </item>

   <item name = "John NJ">
     <FirstName>John</FirstName>
     <LastName>Gentilin</LastName>
      <Address>
        <Street>xxx</Street>
        <City>x</City>
        <State>xx</State>
        <Zip>08823</Zip>
      </Address>
    </item>

    <item name = "Avi">
      <FirstName>Avi</FirstName>
      <LastName>Paraside</LastName>
       <Address>
         <Street>xx</Street>
         <City>xx</City>
         <State>NJ</State>
         <Zip>08823</Zip>
        </Address>
     </item>
</data>


-- 
--------------------------------------
John Gentilin
Eye Catching Solutions Inc.
18314 Carlwyn Drive
Castro Valley CA 94546

     Contact Info
gentijo@eyecatching.com
Ca Office 1-510-881-4821
NJ Office 1-732-422-4917



Re: Help, Ext Elements and core Xalan issues

Posted by John Gentilin <ge...@eyecatching.com>.
Hi Mikko,

I looked into XForms with the book "Essential XForms"
but the model did not seem to fit what I was trying to
accomplish. I like to code projects that are spec compliant
but it just wasn't clicking, although the model I am working
with is somewhat close to an XForms model.
I searched around, and hopefully I am not proved wrong, but
their weren't any existing XForms editors available for Eclipse
and since I am creating the editor I think the problem would
be the same XForms or other ??

Now that I have some of the conceptual issues worked out and
I understand the domain a bit more, I will give the XForms
spec another go to see how close I am, and what can be done
differently.

Thanks
John G

Mikko Honkala wrote:
> Sounds like XForms :)
> 
> http://www.w3.org/TR/xforms/
> 
> -mikko
> 
> John Gentilin wrote:
> 
>> The Problem:
>>
>> I need a way to run a transformation, that contains extension elements,
>> then after the transformation have the ability to re-execute, selectively
>> some of the templates. i.e. the equivalent of a call-template where
>> I supply the Source Node and the template name.
>>
>> The Task:
>> I am developing a plugin for Eclipse, destined to be Open Sourced,
>> that will take 1 XML (data / configuration) file and 1 or more XSL
>> files to create a Multipage / Manifest style editor where the XSL
>> files will describe a form based on the content of the XML. As the
>> form is created, the source node is stored along with the widget so
>> that the source document will be updated in place. When the form
>> is modified, and you jump to the source editor, the document is 
>> serialized into the source editor, if the source editor is modified,
>> its contents will be parsed and the form will be updated.
>>
>> The idea is to provide a platform to easily create a Project 
>> Configuration file editors without a lot of Widget / DOM programming.
>> I have included some samples below.
>>
>> Currently the foundation seems to be working well, I can create a
>> form and place widgets on it and edit content in both directions.
>> The model that is bugging me now is when you have a left side list,
>> and the right side edits the details of the selected list item.
>> When a list item is selected, I want to re-run the templates
>> responsible for producing the right side fields so that they
>> can query the Selected index of the List to be used as qualifier
>> in the select statement.
>>
>> If this sounds interesting to anyone, I can create a SourceForge
>> project if you want to get involved.
>>
>> The Sample:
>>
>> The following XSL will produce a page in a MultiPage editor that
>> consists of a SWT Group that contains a single text field. This
>> text field will be populate with an Element of the XML source
>> document. If you edit the text field then jump to the source
>> editor, the source XML will reflect the change.
>>
>> The Form:
>> <xsl:template match="/" >
>>   <xfe:layoutSpec name="basic-grid" num-columns="3" />
>>
>>   <xfe:form layout-class="xfef:layout.xfeFill" name="mainForm">
>>
>>     <xfe:container class="xfef:container.xfeGroup" style="border"
>>        layout-class="xfef:layout.xfeGrid" name="mainGroup"
>>        layout-spec="basic-grid">
>>
>>       <xfe:parameter
>>            method="setText"
>>            select="'Edit Command Definitions'" />
>>       <xfe:parameter
>>            method="setBackground" select="'white'" />
>>
>>       <xfe:widget
>>            class="xfef:widget.xfeText"
>>            name="EditField" style="border"
>>           select="/data/item[3]/FirstName" />
>>
>>     </xfe:container>
>>   </xfe:form>
>>
>> </xsl:template>
>>
>> The Data:
>> <data>
>>  <item name = "John Ca">
>>    <FirstName>John</FirstName>
>>    <LastName>Gentilin</LastName>
>>    <Address>
>>     <Street>xxxx</Street>
>>     <City>xxx</City>
>>     <State>Ca</State>
>>     <Zip>94546</Zip>
>>    </Address>
>>   </item>
>>
>>   <item name = "John NJ">
>>     <FirstName>John</FirstName>
>>     <LastName>Gentilin</LastName>
>>      <Address>
>>        <Street>xxx</Street>
>>        <City>x</City>
>>        <State>xx</State>
>>        <Zip>08823</Zip>
>>      </Address>
>>    </item>
>>
>>    <item name = "Avi">
>>      <FirstName>Avi</FirstName>
>>      <LastName>Paraside</LastName>
>>       <Address>
>>         <Street>xx</Street>
>>         <City>xx</City>
>>         <State>NJ</State>
>>         <Zip>08823</Zip>
>>        </Address>
>>     </item>
>> </data>
>>
>>


-- 
--------------------------------------
John Gentilin
Eye Catching Solutions Inc.
18314 Carlwyn Drive
Castro Valley CA 94546

     Contact Info
gentijo@eyecatching.com
Ca Office 1-510-881-4821
NJ Office 1-732-422-4917



Re: Help, Ext Elements and core Xalan issues

Posted by Mikko Honkala <ho...@tml.hut.fi>.
Sounds like XForms :)

http://www.w3.org/TR/xforms/

-mikko

John Gentilin wrote:
> The Problem:
> 
> I need a way to run a transformation, that contains extension elements,
> then after the transformation have the ability to re-execute, selectively
> some of the templates. i.e. the equivalent of a call-template where
> I supply the Source Node and the template name.
> 
> The Task:
> I am developing a plugin for Eclipse, destined to be Open Sourced,
> that will take 1 XML (data / configuration) file and 1 or more XSL
> files to create a Multipage / Manifest style editor where the XSL
> files will describe a form based on the content of the XML. As the
> form is created, the source node is stored along with the widget so
> that the source document will be updated in place. When the form
> is modified, and you jump to the source editor, the document is 
> serialized into the source editor, if the source editor is modified,
> its contents will be parsed and the form will be updated.
> 
> The idea is to provide a platform to easily create a Project 
> Configuration file editors without a lot of Widget / DOM programming.
> I have included some samples below.
> 
> Currently the foundation seems to be working well, I can create a
> form and place widgets on it and edit content in both directions.
> The model that is bugging me now is when you have a left side list,
> and the right side edits the details of the selected list item.
> When a list item is selected, I want to re-run the templates
> responsible for producing the right side fields so that they
> can query the Selected index of the List to be used as qualifier
> in the select statement.
> 
> If this sounds interesting to anyone, I can create a SourceForge
> project if you want to get involved.
> 
> The Sample:
> 
> The following XSL will produce a page in a MultiPage editor that
> consists of a SWT Group that contains a single text field. This
> text field will be populate with an Element of the XML source
> document. If you edit the text field then jump to the source
> editor, the source XML will reflect the change.
> 
> The Form:
> <xsl:template match="/" >
>   <xfe:layoutSpec name="basic-grid" num-columns="3" />
> 
>   <xfe:form layout-class="xfef:layout.xfeFill" name="mainForm">
> 
>     <xfe:container class="xfef:container.xfeGroup" style="border"
>        layout-class="xfef:layout.xfeGrid" name="mainGroup"
>        layout-spec="basic-grid">
> 
>       <xfe:parameter
>            method="setText"
>            select="'Edit Command Definitions'" />
>       <xfe:parameter
>            method="setBackground" select="'white'" />
> 
>       <xfe:widget
>            class="xfef:widget.xfeText"
>            name="EditField" style="border"
>           select="/data/item[3]/FirstName" />
> 
>     </xfe:container>
>   </xfe:form>
> 
> </xsl:template>
> 
> The Data:
> <data>
>  <item name = "John Ca">
>    <FirstName>John</FirstName>
>    <LastName>Gentilin</LastName>
>    <Address>
>     <Street>xxxx</Street>
>     <City>xxx</City>
>     <State>Ca</State>
>     <Zip>94546</Zip>
>    </Address>
>   </item>
> 
>   <item name = "John NJ">
>     <FirstName>John</FirstName>
>     <LastName>Gentilin</LastName>
>      <Address>
>        <Street>xxx</Street>
>        <City>x</City>
>        <State>xx</State>
>        <Zip>08823</Zip>
>      </Address>
>    </item>
> 
>    <item name = "Avi">
>      <FirstName>Avi</FirstName>
>      <LastName>Paraside</LastName>
>       <Address>
>         <Street>xx</Street>
>         <City>xx</City>
>         <State>NJ</State>
>         <Zip>08823</Zip>
>        </Address>
>     </item>
> </data>
> 
>