Hi Gareth, As you've noticed from the FAQ, Xerces' support for XPointer in XInclude is limited to the XPointer Framework [1] and XPointer element() scheme [2]. This is the minimum support [3] required for a conforming XInclude processor. There has been no discussion on expanding/enhancing the XPointer support so likely what you see is what you're going to get for the foreseeable future from Xerces. If you need support for other kinds of XPointers then you may want to take a look on the net at some of the other XInclude processors that are available. e.g. perhaps XOM [4] supports what you're looking for.
Thanks. [1] http://www.w3.org/TR/2003/REC-xptr-framework-20030325/ [2] http://www.w3.org/TR/2003/REC-xptr-element-20030325/ [3] http://www.w3.org/TR/2006/REC-xinclude-20061115/#application [4] http://www.xom.nu/ Michael Glavassevich XML Parser Development IBM Toronto Lab E-mail: mrgla...@ca.ibm.com E-mail: mrgla...@apache.org Gareth Western <gar...@garethwestern.com> wrote on 02/02/2009 05:20:40 PM: > Hi, > > I have an application which uses Xerces-J (2.9.0) to parse a large xml > document which I'd like to split into several smaller files just to > make it easier to manage. The main file looks like this: > > <function-set xmlns:xi="http://www.w3.org/2001/XInclude"> > <xi:include href="PrivateFunctions.xml" /> > <xi:include href="GroupFunctions.xml" /> > ... > </function-set> > > Each of the included files is similar to the following: > > <function-set> > <function code="FC1000" /> > <function code="FC1001" /> > ... > </function-set> > > The schema prevents me from including the entire inner file, as that > would result in nested function-set elements, so ideally i'd like to > only include the functions from each inner file. XPointer looks like > it would be the answer to this, changing the main file to look > something like: > > <function-set xmlns:xi="http://www.w3.org/2001/XInclude"> > <xi:include href="PrivateFunctions.xml" xpointer="/function-set/*" /> > ... > </function-set> > > ... however according to the Xerces XInclude FAQ only the "element()" > scheme is supported. Does this mean I can only reference specific > individual elements from the included file, as opposed to the full > range of functions? > > For example, the following works perfectly, but only includes the > first function from PrivateFunctions.xml: > > <function-set xmlns:xi="http://www.w3.org/2001/XInclude"> > <xi:include href="PrivateFunctions.xml" xpointer="element(/1/1)" /> > </function-set> > > Any suggestions as to how to accomplish what I'm trying to do? Let me > know if you have any questions / if I haven't explained the situation > very well. > > Thanks! > > Gareth > > --------------------------------------------------------------------- > To unsubscribe, e-mail: j-users-unsubscr...@xerces.apache.org > For additional commands, e-mail: j-users-h...@xerces.apache.org