ws-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Ws Wiki] Trivial Update of "Tuscany/Extending/StAXLoading" by JeremyBoynes
Date Sat, 15 Apr 2006 23:00:59 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Ws Wiki" for change notification.

The following page has been changed by JeremyBoynes:
http://wiki.apache.org/ws/Tuscany/Extending/StAXLoading

------------------------------------------------------------------------------
  
  The load method is called positioned on the element to be handled ({{{<implementation.js>}}})
so that all attributes and content can be handled. The load method is responsible for parsing
the XML stream and returning an appropriate {{{AssemblyObject}}} (in this case a !JavaScriptImplementation).
In this example, the loader is using the stream directly but it could just as easily use the
data binding library of its choice. When the method returns, the reader should be positioned
on the matching element end event. 
  
- In this case, the !JavaScript implementation needs to access two external resources that
are not part of the XML file. The source code for the script is loaded in the loadScript()
method and stored as a property in the configuration model. Similarly the component definition
is loaded from a {{{.componentType}}} sidefile by the loadComponentType() method and also
stored in the model. The resulting {{{Implementation}} object is thereby complete and the
builder can create the final component without having to load external resources.
+ In this case, the !JavaScript implementation needs to access two external resources that
are not part of the XML file. The source code for the script is loaded in the loadScript()
method and stored as a property in the configuration model. Similarly the component definition
is loaded from a {{{.componentType}}} sidefile by the loadComponentType() method and also
stored in the model. The resulting {{{Implementation}}} object is thereby complete and the
builder can create the final component without having to load external resources.
  
  To add the loader to the runtime configuration a {{{<component>}}} definition is added
in a SCA Assembly file:
  {{{

Mime
View raw message