RE: XML Stored in a Database

2002-03-17 Thread Learhinan, Lance (DAIS)

Try using this snippet

  
  xsl:template match=sql:page_content

xsl:value-of disable-output-escaping=yes select=text()/

  /xsl:template

The main part that you will be interested in is the disable-output-escaping


That should do it...

LAnce

-Original Message-
From: Axel Honfi [mailto:[EMAIL PROTECTED]]
Sent: Saturday, 16 March 2002 7:33 AM
To: [EMAIL PROTECTED]
Subject: AW: XML Stored in a Database




-Ursprüngliche Nachricht-
Von: Alan Tibbetts [mailto:[EMAIL PROTECTED]]
Gesendet: Freitag, 15. März 2002 19:52
An: [EMAIL PROTECTED]
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.

paragraphHello, this is italicdynamic/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();

sectionxsp:exprdynamicXML/xsp:expr/section.

I want this to result in:

section
paragraph
Hello, this is italicdynamic/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;paragraphgt;Hello, this is
lt;italicgt;dynamiclt;/italicgt;.lt;/paragraphgt;

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

section
lt;paragraphgt;Hello, this is
lt;italicgt;dynamiclt;/italicgt;.lt;/paragraphgt;
/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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: XML Stored in a Database

2002-03-16 Thread Andreas Kuehne


Hi Christian !

 Alan, you haven't done a good job. This is a FAQ. Please look at the util
 logicsheet. It allows you to include anything as XML.

I'm doing my job as bad as Alan ...

Can you give a link to the logicsheet ?


Thank you in advance

andreas

__
Do You Yahoo!?
Yahoo! Sports - live college hoops coverage
http://sports.yahoo.com/

-
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: XML Stored in a Database

2002-03-16 Thread Alan Tibbetts


 Alan, you haven't done a good job. This is a FAQ. Please look at the util
 logicsheet. It allows you to include anything as XML.

After some trial and error, and more google searches I got this to work.
The answer (for anyone that may be interested) was:

util:include-expr
util:exprXMLFromDatabase/util:expr
/util:include-expr

Thanks

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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: XML Stored in a Database

2002-03-16 Thread Alan Tibbetts

 I'm doing my job as bad as Alan ...

:)
 
 Can you give a link to the logicsheet ?

All the built in logicsheets are in the cocoon jar.  

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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




XML Stored in a Database

2002-03-15 Thread Alan Tibbetts

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.

paragraphHello, this is italicdynamic/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();

sectionxsp:exprdynamicXML/xsp:expr/section.

I want this to result in:

section
paragraph
Hello, this is italicdynamic/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;paragraphgt;Hello, this is
lt;italicgt;dynamiclt;/italicgt;.lt;/paragraphgt;

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

section
lt;paragraphgt;Hello, this is
lt;italicgt;dynamiclt;/italicgt;.lt;/paragraphgt;
/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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: XML Stored in a Database

2002-03-15 Thread Christian Haul

On 15.Mar.2002 -- 06:51 PM, Alan Tibbetts wrote:
 Hi
 
 I've trawled the archives and samples, but can't see the answer to this one.

Alan, you haven't done a good job. This is a FAQ. Please look at the util
logicsheet. It allows you to include anything as XML.

Chris.

-- 
C h r i s t i a n   H a u l
[EMAIL PROTECTED]
fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08

-
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




AW: XML Stored in a Database

2002-03-15 Thread Axel Honfi



-Ursprüngliche Nachricht-
Von: Alan Tibbetts [mailto:[EMAIL PROTECTED]]
Gesendet: Freitag, 15. März 2002 19:52
An: [EMAIL PROTECTED]
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.

paragraphHello, this is italicdynamic/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();

sectionxsp:exprdynamicXML/xsp:expr/section.

I want this to result in:

section
paragraph
Hello, this is italicdynamic/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;paragraphgt;Hello, this is
lt;italicgt;dynamiclt;/italicgt;.lt;/paragraphgt;

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

section
lt;paragraphgt;Hello, this is
lt;italicgt;dynamiclt;/italicgt;.lt;/paragraphgt;
/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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]