You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Brent L Johnson <br...@bjohnson.net> on 2001/08/23 19:35:28 UTC
Validating XML from DB
Is there a way to test possible XML data from a database prior to doing an
<esql:get-xml column="DESC"/> ?
The problem is, if someone else (non-technical) enters the data in the
database and they forget to close off a tag or something, is there a way I
can intercept that - or tell that it's not valid prior to inserting in the
database - or prior to the esql:get-xml? Also, is there a way to intercept
a cocoon error and do a redirect or show some page other than the standard
grey error box?
Thanks,
- Brent
---------------------------------------------------------------------
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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
Re: Validating XML from DB
Posted by "Marcelo F. Ochoa" <mo...@ieee.org>.
Brent L Johnson wrote:
>Is there a way to test possible XML data from a database prior to doing an
><esql:get-xml column="DESC"/> ?
>
>The problem is, if someone else (non-technical) enters the data in the
>database and they forget to close off a tag or something, is there a way I
>can intercept that - or tell that it's not valid prior to inserting in the
>database - or prior to the esql:get-xml? Also, is there a way to intercept
>a cocoon error and do a redirect or show some page other than the standard
>grey error box?
>
>Thanks,
>
Which database are you using?
For Oracle database you could make a simple trigger (after insert)
with the validation logic, including parsing of the XML with Oracle's
xmlparser running inside the database.
Best regards, Marcelo.
--
Marcelo F. Ochoa - mochoa@ieee.org
Do you Know DB Prism? Look @ http://www.plenix.com/dbprism/
More info?
Chapter 21 of the book "Professional XML Databases" (Wrox Press
http://www.wrox.com/)
Chapter 8 of the book "Oracle & Open Source" (O'Reilly
http://www.oreilly.com/catalog/oracleopen/)
-----------------------------------------------
Lab. de Sistemas - Fac. de Cs. Exactas - UNICEN
Paraje Arroyo Seco - Campus Universitario
(7000) Tandil - Bs. AS. - Argentina
Te: +54-2293-444430 Fax: +54-2293-444431
---------------------------------------------------------------------
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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>