Jean Jordaan wrote:
> 
>> I was strugging to 'xi:include' the content of 'corpauthor' and
>> 'holder', since they have a limited set of children. This works::
>>
>>   <corpauthor>
>>     <xi:include href="terms.xml"
>>                 xmlns:xi="http://www.w3.org/2001/XInclude";
>>                 xpointer="element(idvalue)/1" />,
>>   </corpauthor>
>>
>> I.e. get the first child (which is just a text node) of the element
>> with 'id="idvalue"'.
> 
> Actually, I was fooling myself when I wrote that. Upon looking closer I
> see that the element scheme should actually look like this::
> 
>     element(idvalue/1)
> 
> See http://www.w3.org/TR/xptr-element/#model
> 
> However, XXE ignores the subpath here. And xmllint chokes on it::

Not a bug: "idvalue/1" means first child *element* of element having 
"idvalue" as its ID.



>   element include: XInclude error : XPointer evaluation failed:
> #element(astrata/1)
> 
> Thinking about it, I suspect it's impossible for XXE to xinclude a text
> node only. Is that true?

Yes. The element scheme does not allow to include text nodes, just 
element nodes. And XXE just supports the element() Scheme, not the 
xpointer() Scheme.



> Anyway, now I'm stuck. 'phrase' is the only suitably neutral element,
> and for some reason it isn't allowed as child of 'corpauthor' or
> 'holder'.

Why not directly include a corpauthor element? Nothing forces you to 
restrict yourself to phrase elements.




Reply via email to