How to make use of SpecificationParser Service point with custom loaded specification ?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

How to make use of SpecificationParser Service point with custom loaded specification ?

andyk
Hiya

Im making use of the Tapestry4-alpha 3 and wish to use a custom component & page
specification loader (to dynamically construct my specification) ..
which appears to be facilitated through the use of an
ISpecificationResolverDelegate.

I have implemented my class which exposes this interface, and this
class constructs dynamically a component and/or page specification
into a string object representation.
The ISpecificationResolverDelegate specifies that implementers must
return an IComponentSpecification from either of its two methods, so
my understanding is that upon retrieval / construction of the
specification it is the responsibility of the
ISpecificationResolverDelegate class to actually parse this
specification in order to construct the return IComponentSpecification
object.

Because my dynamically constructed specification does not require any
specialist parsing I wish to make use of the existing parsing
facilities and so expected to use the SpecifcationParser service
point. However having looked into the implementation of the
SpecificationParser, the two methods parsePage.. and
parseComponentSpecification both accept a Resource parameter which
identifies the specification to parse. In the parseDocument() method
this Resource has its get.ComponentURL method invoked to make use of a
URL representation of the resource and subsequently has openStream()
invoked on the URL object in order to provide the parser with the
source to parse.

This is where I now need some help in being able to pass my string
representation of a page or component specification into the default
parsing process ?
Any help would be appreciated in how to convert my string
representation into a Resource object that could return a URL
representation of this String object or enlightenment on how I should
have approached this problem from another direction, all I wish to
achieve is to have the ability to construct dynamically a string
representation of a given specification and use this specification at
run time ?

Thanks

Andy

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]