(I recommend subscribing to the mailing list; there is not a lot of traffic)

Just in case it's unclear, note that there is a big difference between domify (the 
view) and xslt (the transform).  You can run xslt transforms on just about any type of 
view; domify is just one way of generating xml-like input.

What other sources of XML-like data do you have?

Can you do something like this?

<command name="blah">
  <controller class="foo.Bar"/>
  <view name="fromFile" type="trivial">
    <transform path="myStylesheet.xsl"/>
  </view>
  <view name="fromModel" type="domify">
    <transform path="myStylesheet.xsl"/>
  </view>
</command>

Jeff Schnitzer
[EMAIL PROTECTED]

> -----Original Message-----
> From: Mougenot Sylvain [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, October 01, 2002 12:56 AM
> To: Schnitzer, Jeff
> Subject: RE: [Mav-user] Domify, adding my own xml to the model.
> 
> Thank you for your advices.
> I need to use the first option because the trivial view wont do enougth.
> (I've other sources of datas than XML files that have to pass Domify
> adapters)
> 
> I've just a trouble with that : what about performances!
> Somehow, I will have a lot of documents to parse. And DOM representation
> demands much more ressoures.
> Is theire an other way to do so, using a parameter in Domify or ...
> 
> 
> 
> 
> 
> -----Message d'origine-----
> De : Schnitzer, Jeff [mailto:[EMAIL PROTECTED]]
> Envoy� : lundi 30 septembre 2002 22:03
> � : [EMAIL PROTECTED]
> Cc : Mougenot Sylvain
> Objet : RE: [Mav-user] Domify, adding my own xml to the model.
> 
> 
> > From: Mougenot Sylvain [mailto:[EMAIL PROTECTED]]
> >
> > Aim:
> >     The controller have to pass the selected contents (as XML
> Strings)
> > to the vue XSL throught domify.
> >
> > Problem:
> >     Domify treat the XML String as a CData. I mean it masks "<"
> ">",...
> > so that I've no more XML structure at the output.
> 
> Right, that's as intended.  Think of the model as a DOM, not an XML
> stream - strings in the nodes (or within SAX events) are not
> re-interpreted as XML.
> 
> There are a couple easy ways to do what you want to do.  The first (and
> more complicated) way is to parse the XML yourself using the JAXP api in
> your Controller and put the DOM objects in your model.  If you want fine
> control of the model, this is probably your best bet.
> 
> If you're fine with the XML string itself being the whole model, then
> the easiest way to do this by far is to use the "trivial" view type.
> You simply set the String (or a Reader to the XML stream) as the model
> (by calling ControllerContext.setModel() ).  It will be passed into the
> transform process and processed automatically.
> 
> I suspect the second option is what you're looking for.
> 
> <view type="trivial">
>   <transform path="blah.xsl"/>
> </view>
> 
> The documentation for TrivialViewFactory:
> 
> http://mav.sourceforge.net/api/org/infohazard/maverick/view/TrivialViewF
> actory.html
> 
> Jeff Schnitzer
> [EMAIL PROTECTED]
> 
> 
> **********************************************************************
> Ce message et ses �ventuels fichiers attach�s sont confidentiels
> et sont uniquement � l'attention de la personne physique ou morale
> destinatrice. Si vous avez re�u ce message par erreur, merci d'en
> avertir l'exp�diteur.
> 
> Ce bas de page assure �galement que ce message a �t� v�rifi� par un anti-
> virus
> **********************************************************************


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
[INVALID FOOTER]

Reply via email to