You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Morten Primdahl <mo...@caput.com> on 2000/05/02 10:30:27 UTC

newbie: DOM -xsl-> markup?

Hi

All the information I've found on XML/DOM/XSL etc
is rather focused on applying XSL on XML files.
Is there a way to control XSL in my 'object space'?
What I want to do, is generate a DOM object on
the basis of IMAP data, apply client dependant
XSL to that, and output a valid markup (eg. WML/HTML).
The XML technologies are new to me, so if this
doesn't make sense, please correct me: 
Can I construct a DOM object in memory, instantiate 
some 'XSL object' from an XSL file and somehow
generate/restrict output based on that?

Pointers to info relevant to this topic is greatly
appreciated, thanks.

Morten

-- 
Morten Primdahl		Caput ApS	Tel +45 33 12 24 42		
morten@caput.com	Nygade 6	Fax +45 33 91 24 42
http://www.caput.com	DK-1164 Kbh K

XSP adding XML java.

Posted by Kees Jongenburger <ke...@netlinq.nl>.
Hi, 

i am currently writing a poll class witch should be used as part of an XSPlib
to be incorporated with different pages. Now the poll class should return part 
of an XML document something like
this:
<poll>
	<question>
	    <title>Should Cocoon have default polls?</title>
	    <answers>
		    <answer name="Yes Yes Yes!!!" value="yes"/>
		    <answer name="No No No!!!" value="yes"/>
	    </answers>
	</question>
</poll>

my xsl(from the lib) looks like this:
<xsl:template match="netlinq:poll">
        <xsl:copy>
             <xsp:expr>forum.getForum()</xsp:expr>
        </xsl:copy>
</xsl:template>


Now in java if i return a String the < and > tags are transformed so that
the exact text is displayed . If i return an XObject results are better
(only the #text is returned but the tags are omited)

what should the aproch be? 
i realy whant to be able to use "Pure" java to create document fragments witch 
wil be processed by the xslt

Kees Jongenburger


Re: newbie: DOM -xsl-> markup?

Posted by mo...@itu.dk.
Sorry about the repost. For some reason the
original post didn\'t reach the list until
several hours after it was sent.

Morten

Citat Morten Primdahl <mo...@caput.com>:

> 
> Hi
>
> All the information I\'ve found on XML/DOM/XSL etc
> is rather focused on applying XSL on XML files.
> Is there a way to control XSL in my \'object space\'?
> What I want to do, is generate a DOM object on
> the basis of IMAP data, apply client dependant
> XSL to that, and output a valid markup (eg. WML/HTML).
> The XML technologies are new to me, so if this
> doesn\'t make sense, please correct me:
> Can I construct a DOM object in memory, instantiate
> some \'XSL object\' from an XSL file and somehow
> generate/restrict output based on that?
>
> Pointers to info relevant to this topic is greatly
> appreciated, thanks.
>
> Morten
>
> --
> Morten Primdahl		Caput ApS	Tel +45 
33 12 24 42		
> morten@caput.com	Nygade 6	Fax +45 33 91 
24 42
> http://www.caput.com	DK-1164 Kbh K
>
> ------------------------------------------------------
---------------
> To unsubscribe, e-mail: cocoon-users-
unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-
help@xml.apache.org
>