On 11/9/06, Sridhar Raman <[EMAIL PROTECTED]> wrote:
I made my Document View, and did the importing, and assigned the references
programmatically. That works fine.
But I have another small problem - concerning namespaces.
This is the structure of the nodes:
CON
|---ENTS
|---DIM
There can be many DIM nodes, and all should be under the main node of
/CON/ENTS. So I create an XML document in Document View format, that will be
imported.
The first time, I created a file in this style:
<ents ...>
<dim/>
<dim/>
<dim/>
<dim/>
</ents>
And I did the importXML("/con", ...) using this method call. It worked fine,
with just a small hitch. I had to define all the namespaces again as part of
the <ent> element. Else, the import kept throwing unrecognised prefix
exceptions. I did that and it worked.
i don't see any namespaces being used in your example. what namespaces
are you talking of. can you provide a small sample xml file?
Now I want to do a second set of import to this same workspace. And I
created the Document View in the same style as earlier. The import gives me
something like this.
/con/ent/dim/...
/con/ent/dim1/...
/con/ent/dim2/...
/con/ent/dim3/...
/con/ent/dim4/...
..[DATA from first import]
..
/con/ent2/dim/...
/con/ent2/dim1/...
/con/ent2/dim2/...
/con/ent2/dim3/...
..[DATA from second import]
..
What should be done to get the new list of <dim> nodes to go under the
earlier <ent>?
i don't think that this can be done by using the jcr importXML methods.
you'll either have to do it programmatically or write a custom SAX
ContentHandler.
I tried this kind of Document View
<dim>
<dim1>
<dim2>
...
and importing using the call importXML("/con/ent/", ..)
This gives 2 problems:
1) it's not well formed
2) namespaces not found
again, what namespaces are you talking of?
cheers
stefan
What do I do?? Is there any solution to this?
I would be glad if you could help me with this.
Thanks in advance,
Sridhar