You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xindice-users@xml.apache.org by Majirus FANSI <ma...@yahoo.fr> on 2004/03/18 19:10:00 UTC

xindice and xml schema

Hi all,
can xindice validate an xml document via xml schema before storing it? And what is the situation for every other native xml database?
regards
 
Majirus

		
---------------------------------
Yahoo! Mail : votre e-mail personnel et gratuit qui vous suit partout !
Créez votre Yahoo! Mail

Dialoguez en direct avec vos amis grâce à Yahoo! Messenger !

Re: xindice and xml schema

Posted by Murray Altheim <m....@open.ac.uk>.
Majirus FANSI wrote:
> Thank Murray,
> The think i don't know until now is that: how to access to 
> an xml processor integrated to an native xml database like xindice?
> regards,

Majirus,

You'd in your own code import the XML processor packages as
you would any package, instantiate the processor, and use it
as you would any XML parser/processor. No different. If you
don't know how to do that, either snoop around in the Xindice
org.apache.xindice.xml.dom package (which is the compressed
DOM package), or if you don't want to use the compressed DOM,
just a normal DOM, you'd just instantiate a processor as part
of Sun's Java2. If you're not using Sun's Java 2, you'd have to
locate the documentation on how to create and use XML parsers
using your Java version. Sun has an API called JAXP that you
should probably familiarize yourself with -- in doing so you'll
find documentation on how to set up and use general-purpose
XML processors. A number of the major Java implementations use
the JAXP API, which insulates you from having to know about
which Java implementation is available.

Hope that helps,

Murray

> Murray Altheim <m....@open.ac.uk> wrote:
> Majirus FANSI wrote:
> 
>>Hi all,
>>can xindice validate an xml document via xml schema before 
>>storing it? And what is the situation for every other native 
>>xml database?
 >
> It's really not the job of a database to validate XML content.
> The task falls to an XML processor. If you're running Xindice
> you have access to an XML processor (i.e., Xindice won't run
> without one), so you can use the XML processor to perform the
> validation at any stage during document processing, not just
> prior to storage.
> 
> Because Xindice can use a variety of XML processors, it's only
> a question of whether the specific XML processor you're using
> supports validation via XML Schema. Xerces, for example, does,
> as well as JAXP, the XML processing that's part of Sun's Java 2.
> 
> Murray

Murray

......................................................................
Murray Altheim                    http://kmi.open.ac.uk/people/murray/
Knowledge Media Institute
The Open University, Milton Keynes, Bucks, MK7 6AA, UK               .

   "Peoples' primary requirement is that some kind of coherence be
    provided. Stories give people the feeling that there is meaning,
    that there is ultimately an order lurking behind the incredible
    confusion of appearances and phenomena that surrounds them. This
    order is what people require more than anything else; yes, I
    would almost say that the notion of order or story is connected
    with the godhead. Stories are substitutes for God. Or maybe the
    other way round." -- Wim Winders


Re: xindice and xml schema

Posted by Majirus FANSI <ma...@yahoo.fr>.
Thank Murray,
The think i don't know until now is that: how to access to an xml processor integrated to an native xml database like xindice?
regards,
 
majirus


Murray Altheim <m....@open.ac.uk> wrote:
Majirus FANSI wrote:
> Hi all,
> can xindice validate an xml document via xml schema before 
> storing it? And what is the situation for every other native 
> xml database?
> regards
> 
> Majirus

It's really not the job of a database to validate XML content.
The task falls to an XML processor. If you're running Xindice
you have access to an XML processor (i.e., Xindice won't run
without one), so you can use the XML processor to perform the
validation at any stage during document processing, not just
prior to storage.

Because Xindice can use a variety of XML processors, it's only
a question of whether the specific XML processor you're using
supports validation via XML Schema. Xerces, for example, does,
as well as JAXP, the XML processing that's part of Sun's Java 2.

Murray

......................................................................
Murray Altheim http://kmi.open.ac.uk/people/murray/
Knowledge Media Institute
The Open University, Milton Keynes, Bucks, MK7 6AA, UK .

"Peoples' primary requirement is that some kind of coherence be
provided. Stories give people the feeling that there is meaning,
that there is ultimately an order lurking behind the incredible
confusion of appearances and phenomena that surrounds them. This
order is what people require more than anything else; yes, I
would almost say that the notion of order or story is connected
with the godhead. Stories are substitutes for God. Or maybe the
other way round." -- Wim Winders

		
---------------------------------
Yahoo! Mail : votre e-mail personnel et gratuit qui vous suit partout !
Créez votre Yahoo! Mail

Dialoguez en direct avec vos amis grâce à Yahoo! Messenger !

Re: xindice and xml schema

Posted by Murray Altheim <m....@open.ac.uk>.
Majirus FANSI wrote:
> Hi all,
> can xindice validate an xml document via xml schema before 
> storing it? And what is the situation for every other native 
> xml database?
> regards
>  
> Majirus

It's really not the job of a database to validate XML content.
The task falls to an XML processor. If you're running Xindice
you have access to an XML processor (i.e., Xindice won't run
without one), so you can use the XML processor to perform the
validation at any stage during document processing, not just
prior to storage.

Because Xindice can use a variety of XML processors, it's only
a question of whether the specific XML processor you're using
supports validation via XML Schema. Xerces, for example, does,
as well as JAXP, the XML processing that's part of Sun's Java 2.

Murray

......................................................................
Murray Altheim                    http://kmi.open.ac.uk/people/murray/
Knowledge Media Institute
The Open University, Milton Keynes, Bucks, MK7 6AA, UK               .

   "Peoples' primary requirement is that some kind of coherence be
    provided. Stories give people the feeling that there is meaning,
    that there is ultimately an order lurking behind the incredible
    confusion of appearances and phenomena that surrounds them. This
    order is what people require more than anything else; yes, I
    would almost say that the notion of order or story is connected
    with the godhead. Stories are substitutes for God. Or maybe the
    other way round." -- Wim Winders