cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Axel Honfi" <e9626...@student.tuwien.ac.at>
Subject AW: XML Stored in a Database
Date Fri, 15 Mar 2002 21:02:44 GMT


-----Ursprüngliche Nachricht-----
Von: Alan Tibbetts [mailto:alan@blackenedsystems.com]
Gesendet: Freitag, 15. März 2002 19:52
An: cocoon-users@xml.apache.org
Betreff: XML Stored in a Database


Hi

I've trawled the archives and samples, but can't see the answer to this one.

I have XML stored as a string in a database, e.g.

"<paragraph>Hello, this is <italic>dynamic</italic>.</paragraph>"

I'm using XSP/Logicsheets (and my own db access classes) to retrieve this
data into another XML element, eg.

String dynamicXML = getFromDatabase();

<section><xsp:expr>dynamicXML</xsp:expr></section>.

I want this to result in:

<section>
	<paragraph>
		Hello, this is <italic>dynamic</italic>.
	</paragraph>
</section>

Unfortunately, the 'dynamic XML' is being treated as text during the
transformation.  Looking at the source of the resulting HTML page I see:

lt;paragraph&gt;Hello, this is
&lt;italic&gt;dynamic&lt;/italic&gt;.&lt;/paragraph&gt;

So I think my XML after the XSP is processed looks like:

<section>
	lt;paragraph&gt;Hello, this is
&lt;italic&gt;dynamic&lt;/italic&gt;.&lt;/paragraph&gt;
</section>

How do I get XSP/XSL to treat the data coming from the db as XML and
properly insert it into the document tree?  I thought it might be an XSL
problem, but can't see a command that looks like it will do the job.

BTW. I'm using Cocoon 2.0.1/Tomcat 4.0.1/JDK 1.3.1/Win2K

Cheers

Alan


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

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

At first glance I think that a quick and dirty way would be to define your
&-expressions in XSL so that they will be substituted while transformed.

maybe it'll help you

Axel





---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

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


Mime
View raw message