Re: New draft of XInclude 1.1

On 18.11.2014 16:39, Norman Walsh wrote:
> Assuming no one has any propsed changes, I'll try to get a pubrules
> clean LC draft ready with a pubdate of, oh, 2 Dec. Works for everyone?

Today I got private email with intent to implement XInclude 1.1 from
company developing XML product. I asked for permission to forward
message here, but haven't got one yet.

But overall this is good news. However this message was related to
DocBook transclusions which are built on top of XInclude 1.1 and were
main motivation for doing XInclude 1.1. Message contained request to
make DocBook transclusion mechanism more generic and useful for other
vocabularies as well, which means porting some of it's functionality to
XInclude. We discussed such options in past and I don't want to reopen
this discussion.

However there is one feature which I think we should add to XInclude 1.1
and if I recall it correctly we haven't discussed yet and it come to
mind today. Attribute copying now copies only namespaced attributes.
Which means that if you want to override local attribute in a target
vocabulary you must do some sort of post-processing. For example if you
want to override profiling conditions on included DocBook fragment you
must do something like:

<xi:include href="docbook.fragment.xml" db:condition="print"
xmlns:db="http://example.com"/>

and then do additional processing step which will turn db:condition
attribute back just condition (non-namespace attribute).

It seems useful and easy to solve such use-case by providing special
XInclude related namespace which will allow copying of local attributes.
We can say that attributes in namepsace
"http://www.w3.org/2001/XInclude-copy-as-local-attribute" are copied but
namespace is removed.

So above example can be written as

<xi:include href="docbook.fragment.xml" xia:condition="print"
xmlns:xia="http://www.w3.org/2001/XInclude-copy-as-local-attribute"/>

Advantage is that there is no need for additional post-processing and
correction of attribute names.

I think that if we are going to do another LC anyway we might consider
adding this feature into spec as well. It's quite coherent with recent
set-xml-id functionality -- if we allow direct modification of xml:id
during inclusion, we should allow modification of local attributes as
well. We should support removal of attribute by specifying empty value
as well.

Comments?

    Jirka


-- 
------------------------------------------------------------------
  Jirka Kosek      e-mail: jirka@kosek.cz      http://xmlguru.cz
------------------------------------------------------------------
     Professional XML and Web consulting and training services
DocBook/DITA customization, custom XSLT/XSL-FO document processing
------------------------------------------------------------------
 OASIS DocBook TC member, W3C Invited Expert, ISO JTC1/SC34 rep.
------------------------------------------------------------------
    Bringing you XML Prague conference    http://xmlprague.cz
------------------------------------------------------------------

Received on Tuesday, 18 November 2014 16:56:44 UTC