cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From scott <sc...@evolove.net>
Subject capture logicsheet continued
Date Mon, 18 Aug 2003 10:52:17 GMT
ok at the moment, I'm trying to just get the value from my DOM fragment. I was
told that getFirstChild() is the method I'm after, but I still can't seem to
print out the value of my fragment, eg:

<capture:dom-variable name="blahDom">
  <blah>you are the one, mr blah</blah>
</capture:dom-variable>
<xsp:expr>blahDom</xsp:expr>

<xsp:logic>
System.out.println("@@@@@ blahDom");
System.out.println("classname:"+blahDom.getClass().getName());
System.out.println("node name:"+blahDom.getNodeName());
System.out.println("node type:"+blahDom.getNodeType());
System.out.println("node value:"+blahDom.getNodeValue());
System.out.println("to string:"+blahDom.toString());

System.out.println("@@@@@ blahDom.getFirstChild()");
blahDom = blahDom.getFirstChild();
System.out.println("classname:"+blahDom.getClass().getName());
System.out.println("node name:"+blahDom.getNodeName());
System.out.println("node type:"+blahDom.getNodeType());
System.out.println("node value:"+blahDom.getNodeValue());
System.out.println("to string:"+blahDom.toString());

</xsp:logic>

produces (in console):

@@@@@ blahDom
classname:org.apache.xerces.dom.DocumentFragmentImpl
node name:#document-fragment
node type:11
node value:null
to string:[#document-fragment: null]
@@@@@ blahDom.getFirstChild()
classname:org.apache.xerces.dom.TextImpl
node name:#text
node type:3
node value:

to string:[#text:
                        ]

Which seems strange! Where is my data? All I'm really after is the ability to
assign "you are the one, mr blah" to a variable, and then deal with it in xsp-logic.

cheers,
Scott

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


Mime
View raw message