﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
102	[PATCH] xi:include and fragments	anonymous	cmlenz	"At the moment it is not possible to use `<xi:include href=""somefile.html"" />` to only get a certain subtag of the file.

I suggest something like:

input.html
{{{
<bookstore>
    <books>
        <book class=""scifi"">
            <title>StarTrek</title>
            <title>Babylon 5</title>
            <title>The Blob</title>
        </book>
        <book class=""technical"">
            We don't have any technical books yet
        </book>
        <book class=""scifi"" restriction=""adult"">
            There are no books here yet
        </book>
    </books>
</bookstore>
}}}

 * Using `<xi:include />` '''NOTE: I don't know anything about the xi:include specs'''
{{{
<document>
    <xi:include href=""input.html"" xpath=""//books[@class='scifi'] />
<document> 
}}}

 * Using `<py:xpath path=""...""   />`
{{{
<document>
    <py:xpath path=""//books[@class='scifi']>
        <xi:include href=""input.html"" xpath=""//books[@class='scifi'] />
    </py:xpath>
</document>
}}}
* Note the difference to py:match is that just the part inside py:xpath is processed and only matching attributes are placed
multiple xpath matches could be defined like this: `    <py:xpath path=""//book[@class='scifi'];//book[@class='']/@text"" />
`

 * Result
{{{
<document>
    <book class=""scifi"">
        <title>StarTrek</title>
        <title>Babylon 5</title>
        <title>The Blob</title>
    </book>
    <book class=""scifi"">
        There are no books here yet
    </book>
</document>
}}}

"	enhancement	new	major		Template processing	0.3.6			martin.marcher@… nicoe@…
