xpointer

Friday, 3 April 2015 · 5 messages · last reply 13 Apr 2015
JC
Jerome Chauveau3 Apr 2015 09:49 #
Hi, Are xpointer implemented in BaseX 8? I tried to add an xpointer attribute in an xinclude element but it failed.
[a] <xi:include href="plop.xml"/>
[b] <xi:include href="plop.xml" xpointer="myId"/>
[a] works fine but [b] fails (Fallback is called). Thanks for help, Jérôme.
CG
Christian Grün7 Apr 2015 12:38 #
Hi Jérôme, We currently rely on default Java XInclude support [1]. I assume that it does not properly handle XPointer attributes? Cheers, Christian [1] https://github.com/BaseXdb/basex/blob/master/basex-core/src/main/java/org/basex/build/xml/SAXWrapper.java#L64
Quoted text · Jerome Chauveau · 15 lines
On Fri, Apr 3, 2015 at 9:49 AM, Jerome Chauveau <jerome.chauveau at unicaen.fr> wrote: > Hi, > > Are xpointer implemented in BaseX 8? > I tried to add an xpointer attribute in an xinclude element but it failed. > > [a] <xi:include href="plop.xml"/> > [b] <xi:include href="plop.xml" xpointer="myId"/> > > [a] works fine but [b] fails (Fallback is called). > > Thanks for help, > > Jérôme.
JC
Jérôme Chauveau8 Apr 2015 10:37 #
Hi, thank you for your answer. It was helpfull. Java XInclude support seems to not fully handle XPointer attributes. One solution consists in using the "element" scheme with the "descendant path" notation:
<xi:include href="plop.xml" xpointer="element(/1/3)"/>
Unfortunatly, the "id" notation fails...
<xi:include href="plop.xml" xpointer="element(myId)"/>
Regards, Jérôme.
Quoted text · Christian Grün · 27 lines
Le 07/04/2015 12:38, Christian Grün a écrit : > Hi Jérôme, > > We currently rely on default Java XInclude support [1]. I assume that > it does not properly handle XPointer attributes? > > Cheers, > Christian > > [1] https://github.com/BaseXdb/basex/blob/master/basex-core/src/main/java/org/basex/build/xml/SAXWrapper.java#L64 > > > On Fri, Apr 3, 2015 at 9:49 AM, Jerome Chauveau > <jerome.chauveau at unicaen.fr> wrote: >> Hi, >> >> Are xpointer implemented in BaseX 8? >> I tried to add an xpointer attribute in an xinclude element but it failed. >> >> [a] <xi:include href="plop.xml"/> >> [b] <xi:include href="plop.xml" xpointer="myId"/> >> >> [a] works fine but [b] fails (Fallback is called). >> >> Thanks for help, >> >> Jérôme.
-- Jérôme Chauveau - SAIC-CERTIC - Campus 4 Université de Caen Basse-Normandie
LQ
Liam R. E. Quin8 Apr 2015 18:27 #
Quoted text · Jérôme Chauveau · 4 lines
On Wed, 2015-04-08 at 10:37 +0200, Jérôme Chauveau wrote: > Unfortunatly, the "id" notation fails... > > <xi:include href="plop.xml" xpointer="element(myId)"/>
Are you validating against a DTD? If not, the "ID-ness" property won't be set... It might work if the document uses xml:id without DTD validation. Liam
JC
Jérôme Chauveau13 Apr 2015 11:09 #
Hi Liam, No, there is not validation against a DTD but I am using the xml:id attribute in my target document... I tried several syntaxes - according the w3c specifications - but without any success. Could you give me an example? Thanks. Regards, Jérôme
Quoted text · Jérôme Chauveau · 13 lines
Le 08/04/2015 16:27, Liam R. E. Quin a écrit : > On Wed, 2015-04-08 at 10:37 +0200, Jérôme Chauveau wrote: > >> Unfortunatly, the "id" notation fails... >> >> <xi:include href="plop.xml" xpointer="element(myId)"/> > Are you validating against a DTD? If not, the "ID-ness" property won't > be set... > It might work if the document uses xml:id without DTD validation. > > Liam > >
-- Jérôme Chauveau - SAIC-CERTIC - Campus 4 Université de Caen Basse-Normandie

⚡Generated with XQuery