cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Painter-Wakefield <paint...@mc.duke.edu>
Subject Re: How to nest logicsheet tags of different libraries
Date Wed, 10 Dec 2003 15:26:12 GMT




Too bad.  I guess you'll have to construct the String manually by iterating
over the child nodes of the DocumentFragment yourself.  Check out the API
at
http://java.sun.com/j2se/1.4.1/docs/api/org/w3c/dom/Node.html

-Christopher



|---------+---------------------------->
|         |           "Stephanie       |
|         |           Zohner"          |
|         |           <stephanie.zohner|
|         |           @gmx.at>         |
|         |                            |
|         |           12/10/2003 10:19 |
|         |           AM               |
|         |           Please respond to|
|         |           users            |
|         |                            |
|---------+---------------------------->
  >--------------------------------------------------------------------------------------------------------------|
  |                                                                                      
                       |
  |       To:       users@cocoon.apache.org                                              
                       |
  |       cc:                                                                            
                       |
  |       Subject:  Re: How to nest logicsheet tags of different libraries               
                       |
  >--------------------------------------------------------------------------------------------------------------|




Hi,

>
>
>
>
> seems like it maybe should be using getNodeValue() instead of
> getFirstChild().getNodeValue(), but I'm not familiar with the
> xsp-session-fw stuff (I'm not on C2.1 yet).
>
> The obvious workaround would seem to be
>
> org.w3c.dom.DocumentFragment fragment =
>       <xsp-session-fw:getxml as="object" context="authentication"
> path="/authentication/data/name"/>;
> <blocker:set>fragment.getNodeValue()</blocker:set>

This causes the String to be "null", because getNodevalue() returns null.
:-(

>
> I also wonder what would happen if you did
>
> <blocker:set>
>       <xsp:expr>
>             <xsp-session-fw:getxml as="object" context="authentication"
> path="/authentication/data/name"/>
>       </xsp:expr>
> </blocker:set>

This has the same effect as 'as=string' without the <xsp:expr> tag around.
:-(

>
> which would wrap a String.valueOf() around the DocumentFragment.
>
> -Christopher
>
>
>
> |---------+---------------------------->
> |         |           "Stephanie       |
> |         |           Zohner"          |
> |         |           <stephanie.zohner|
> |         |           @gmx.at>         |
> |         |                            |
> |         |           12/10/2003 04:45 |
> |         |           AM               |
> |         |           Please respond to|
> |         |           users            |
> |         |                            |
> |---------+---------------------------->
>
>
>--------------------------------------------------------------------------------------------------------------|

>   |

>                                       |
>   |       To:       users@cocoon.apache.org

>                                       |
>   |       cc:

>                                       |
>   |       Subject:  Re: How to nest logicsheet tags of different
libraries
>                                       |
>
>
>--------------------------------------------------------------------------------------------------------------|

>
>
>
>
> Thanks a lot, that was the solution, however now I have another problem.
>
> <xsp-session-fw:getxml as="string" context="authentication"
> path="/authentication/data/name"/>
>
> returns not the whole string, I put in the authentication context, but
> only
> the first 7 chars, or so .
> For example, when I put "Stephanie Zohner" in the context, only "Stephan"
> is
> returned.
>
> I looked into the generated Java Code. This is the code fragment, that is
> generated out of the <xsp-session-fw:getxml> Tag.
>
> XSPSessionFwHelper.getXML(this.manager,
>                 String.valueOf("authentication"),
>
>
String.valueOf("/authentication/data/name"))).getFirstChild().getNodeValue())

>
>       );
>
> It takes only the first child node of the returned XML Fragment. However
> "Stephanie Zohner" is shared among 3 child nodes.Taking only the first
> node
> results in extracting only the first of three parts of my name.
>
> This happens when I use the "as= 'string'". If I use "as= 'object'" I
> would
> get the entire string, but then again I get an eeption (as you have
> predicted), because a String is expected by the my method and not an
> DocumentFragment.
>
> Is it a bug, that only the first node is taken when using the attribute
> ''as
> = 'string''?
>
> Are there any work arounds?
>
>
> Thanks in advance,
>
> Stephanie
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>

--
+++ GMX - die erste Adresse für Mail, Message, More +++
Neu: Preissenkung für MMS und FreeMMS! http://www.gmx.net



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org





---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message