You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by Leandro Quiroga <le...@gmail.com> on 2010/05/04 20:01:08 UTC

XPointer

Hi, I'm trying to include the xml inside the tags <att> </att>
(without the tags <att> </att>) into another xml.
How can I do this using the xpointer attribute of the xinclude tag?

<att>
   <xxx/>
   <xxx/>
   <xxx/>
   <xxx/>
   <xxx/>
   <xxx/>
   <xxx/>
   <xxx/>
</att>

I'm using Apache Xerces for parsing the xml.

Thanks

Leandro

---------------------------------------------------------------------
To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-users-help@xerces.apache.org


Re: XPointer

Posted by Michael Glavassevich <mr...@ca.ibm.com>.
Hi Leandro,

The XPointer support [1] in Xerces is currently limited to the XPointer
Framework and XPointer element() schemes. It is possible to do what you
want but it's a bit ugly. You would need N include elements, where N is the
number of <xxx/> elements in your document:

<xi:include href="doc.xml" xpointer="element(/1/1)"/>
<xi:include href="doc.xml" xpointer="element(/1/2)"/>
<xi:include href="doc.xml" xpointer="element(/1/3)"/>
<xi:include href="doc.xml" xpointer="element(/1/4)"/>

etc...

Thanks.

[1] http://xerces.apache.org/xerces2-j/faq-xinclude.html#faq-7

Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: mrglavas@ca.ibm.com
E-mail: mrglavas@apache.ort

Leandro Quiroga <le...@gmail.com> wrote on 05/04/2010 02:01:08 PM:

> Hi, I'm trying to include the xml inside the tags <att> </att>
> (without the tags <att> </att>) into another xml.
> How can I do this using the xpointer attribute of the xinclude tag?
>
> <att>
>    <xxx/>
>    <xxx/>
>    <xxx/>
>    <xxx/>
>    <xxx/>
>    <xxx/>
>    <xxx/>
>    <xxx/>
> </att>
>
> I'm using Apache Xerces for parsing the xml.
>
> Thanks
>
> Leandro
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
> For additional commands, e-mail: j-users-help@xerces.apache.org