I've hit a problem trying to do an xi:include from
custom-processors.xml. (The scenario: we want to ship our product with some 'built-in' processors we've authored, but still allow clients to write & register their own processors). Doing an xi:include from custom-processors doesn't work: <processors xmlns:orion="http://www.orion.com/ops/processors" xmlns:xi="http://www.w3.org/2003/XInclude"> {some predefined custom processors} <xi:include href="/client-custom-processors.xml"/> </processors> because it results in too many levels of nested <processors> elements. And xpointer isn't yet supported on xinclude, so I can't do <xi:include href="/client-custom-processors.xml#xpointer(/processors/processor)"/> As a quick fix, how about modifying the XPath expression which extracts the processors to deal with arbitrary levels of nesting? eg change for (Iterator i = XPathUtils.selectIterator(cfg, "/processors/processor | /processors/processors/processor"); i.hasNext();) { to for (Iterator i = XPathUtils.selectIterator(cfg, "/processors//processor"); i.hasNext();) { Adrian -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Adrian,
Why not get processor.xml out of the ops.jar and put your custom processors in that (it's what orbeon do) then your users can still use the custom-processors.xml file Ryan Ryan Puddephatt Software Engineer Teleflex Group - IT UK 1 Michaelson Square Livingston West Lothian Scotland EH54 7DP e> [hidden email] t> +44(0)1506 407 110 f> +44(0)1506 407 108 >-----Original Message----- >From: Adrian Baker [mailto:[hidden email]] >Sent: 07 January 2007 22:42 >To: [hidden email] >Subject: [ops-users] doing xi:include from custom-processors.xml > >I've hit a problem trying to do an xi:include from >custom-processors.xml. (The scenario: we want to ship our >product with some 'built-in' processors we've authored, but >still allow clients to write & register their own processors). > >Doing an xi:include from custom-processors doesn't work: > ><processors xmlns:orion="http://www.orion.com/ops/processors" > xmlns:xi="http://www.w3.org/2003/XInclude"> > > {some predefined custom processors} > > <xi:include href="/client-custom-processors.xml"/> > ></processors> > >because it results in too many levels of nested <processors> elements. >And xpointer isn't yet supported on xinclude, so I can't do > <xi:include >href="/client-custom-processors.xml#xpointer(/processors/processor)"/> > >As a quick fix, how about modifying the XPath expression which >extracts the processors to deal with arbitrary levels of >nesting? eg change > > for (Iterator i = XPathUtils.selectIterator(cfg, >"/processors/processor | /processors/processors/processor"); >i.hasNext();) { > >to > > for (Iterator i = XPathUtils.selectIterator(cfg, >"/processors//processor"); i.hasNext();) { > >Adrian > > > > -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Administrator
|
In reply to this post by Adrian Baker
Adrian,
That looks reasonably safe ;-) I committed this change. -Erik Adrian Baker wrote: > I've hit a problem trying to do an xi:include from > custom-processors.xml. (The scenario: we want to ship our product with > some 'built-in' processors we've authored, but still allow clients to > write & register their own processors). > > Doing an xi:include from custom-processors doesn't work: > > <processors xmlns:orion="http://www.orion.com/ops/processors" > xmlns:xi="http://www.w3.org/2003/XInclude"> > > {some predefined custom processors} > > <xi:include href="/client-custom-processors.xml"/> > > </processors> > > because it results in too many levels of nested <processors> elements. > And xpointer isn't yet supported on xinclude, so I can't do > <xi:include > href="/client-custom-processors.xml#xpointer(/processors/processor)"/> > > As a quick fix, how about modifying the XPath expression which extracts > the processors to deal with arbitrary levels of nesting? eg change > > for (Iterator i = XPathUtils.selectIterator(cfg, > "/processors/processor | /processors/processors/processor"); > i.hasNext();) { > > to > > for (Iterator i = XPathUtils.selectIterator(cfg, > "/processors//processor"); i.hasNext();) { > > Adrian > > > > > ------------------------------------------------------------------------ > > > -- > You receive this message as a subscriber of the [hidden email] mailing list. > To unsubscribe: mailto:[hidden email] > For general help: mailto:[hidden email]?subject=help > ObjectWeb mailing lists service home page: http://www.objectweb.org/wws -- Orbeon Forms - Web Forms for the Enterprise Done the Right Way http://www.orbeon.com/ -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Free forum by Nabble | Edit this page |