You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by "John L. Poole (Jira)" <xe...@xml.apache.org> on 2021/06/17 16:48:00 UTC

[jira] [Created] (XERCESC-2215) XPointer is not yet supported

John L. Poole created XERCESC-2215:
--------------------------------------

             Summary: XPointer is not yet supported
                 Key: XERCESC-2215
                 URL: https://issues.apache.org/jira/browse/XERCESC-2215
             Project: Xerces-C++
          Issue Type: Bug
    Affects Versions: 3.2.3
         Environment: Gentoo Linux
            Reporter: John L. Poole


The documentation at http://xerces.apache.org/xerces-c/ states XInclude is supported:
...
Features
 conforms to
 ...
 XML Inclusions (XInclude) 1.0 (Second Edition), W3C Recommendation 15 November 2006
 
The XInclude specification entitled "XML Inclusions (XInclude) Version 1.0 (Second Edition)" at https://www.w3.org/TR/2006/REC-xinclude-20061115/ specifies at 3.1 xi:include Element (https://www.w3.org/TR/2006/REC-xinclude-20061115/#include_element):

xpointer

When parse="xml", the XPointer (see [XPointer Framework]) contained in the xpointer attribute is evaluated to identify a portion of the resource to include. This attribute is optional; when omitted, the entire resource is included. The xpointer attribute must not be present when parse="text". If the xpointer attribute is absent, the href attribute must be present.
 
In Gentoo Linux, I installed version 3.2.3-r2
[I] dev-libs/xerces-c
 Available versions: 3.2.3-r2^t **9999*l^t \{curl doc examples iconv icu static-libs test threads CPU_FLAGS_X86="sse2" ELIBC="Darwin FreeBSD"}
 Installed versions: 3.2.3-r2^t(08:04:20 06/17/21)(iconv -curl -doc -examples -icu -static-libs -test -threads CPU_FLAGS_X86="sse2" ELIBC="-Darwin -FreeBSD")
 Homepage: https://xerces.apache.org/xerces-c/
 Description: A validating XML parser written in a portable subset of C++

I then created two sample files:

red.xml:
<book xmlns:xi="http://www.w3.org/2001/XInclude">
 <chapter>
 <title>Red 1</title>
 <para>This is red Chapter 1.</para>
 </chapter>
 <xi:include href="file:///blue.xml" xpointer="blue1" />
</book>

blue.xml:
<book>
 <chapter id="blue1">
 <title> Blue First Chapter</title>
 <para>This is blue first chapter.</para>
 </chapter>
</book>

My run failed to resolve the <xi:include> stating "XPointer is not yet supported":

jlpoole@ares ~/work/xerces $ XInclude red.xml output.xml
 Parse red.xml in progress ...
 Fatal Error at file file:///blue.xml, line 0, char 0
 Message: include element with XPointer specification; XPointer is not yet supported
 finished.
 jlpoole@ares ~/work/xerces 
 
I modified red.xml as follows:
 <xi:include href="blue.xml" xpointer="blue1" />
ran:
jlpoole@ares ~/work/xerces $ XInclude red.xml output.xml
Parse red.xml in progress ...
Fatal Error at file blue.xml, line 0, char 0
 Message: include element with XPointer specification; XPointer is not yet supported
 finished.
jlpoole@ares ~/work/xerces $

copied blue.xml to my apache server, confirmed that Apache serves us blue.xml. Modified red.xml:

jlpoole@ares ~/work/xerces $ XInclude red.xml output.xml
Parse red.xml in progress ...
Fatal Error at file http://localhost/blue.xml, line 0, char 0
 Message: include element with XPointer specification; XPointer is not yet supported
 finished.
jlpoole@ares ~/work/xerces $

Confirmed the URL resolves using wget:

jlpoole@ares ~/work/xerces $ wget http://localhost/blue.xml
 --2021-06-17 09:38:23-- http://localhost/blue.xml
 Resolving localhost... ::1, 127.0.0.1
 Connecting to localhost|::1|:80... connected.
 HTTP request sent, awaiting response... 200 OK
 Length: 138 [application/xml]
 Saving to: ‘blue.xml.1’

blue.xml.1 100%[=========================================================>] 138 --.-KB/s in 0s

2021-06-17 09:38:23 (6.52 MB/s) - ‘blue.xml.1’ saved [138/138]

jlpoole@ares ~/work/xerces $

What am I missing?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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