W3C home > Mailing lists > Public > xproc-dev@w3.org > November 2010

Bug in Calabash : double xmlns declaration

From: mozer <xmlizer@gmail.com>
Date: Tue, 23 Nov 2010 09:02:22 +0100
Message-ID: <AANLkTi=W2KD6LNFqN7C5jFLE6PyzowqiSE_kcXiykaPR@mail.gmail.com>
To: XProc Dev <xproc-dev@w3.org>
In the following example  I ended up having on the very same element
those two conflicting namespace declaration that make the document invalid

xmlns=""
xmlns="http://bar"

Was it me misusing it or is this a bug in Calabash ?

Xmlizer

<?xml version="1.0" encoding="UTF-8"?>
<p:declare-step xmlns:p="http://www.w3.org/ns/xproc"
xmlns:c="http://www.w3.org/ns/xproc-step" version="1.0">
  <p:input port="source" sequence="true">
    <p:inline>
      <root xmlns="http://foo">
        <doc>Hello world!</doc>
        <doc>Hello world!</doc>
        <doc xmlns="http://baz">Hello world!</doc>
        <docx>Hello world!</docx>
        <doc>Hello world!</doc>
        <doc>Hello world!</doc>
        <doc>Hello world!</doc>
        <docx>Hello world!</docx>
        <doc>Hello world!</doc>
        <doc>Hello world!</doc>
        <doc>Hello world!</doc>
      </root>
    </p:inline>
    <p:inline>
      <root xmlns="http://foo">
        <doc>Hello world!</doc>
      </root>
    </p:inline>
  </p:input>
  <p:output port="result" sequence="true"/>
  <p:for-each>
    <p:add-attribute attribute-name="foo" match="*[1]">
      <p:with-option name="attribute-value" select="p:iteration-position()"/>
    </p:add-attribute>
    <p:label-elements match="*">
      <p:with-option name="label"
select="concat('concat(&quot;_&quot;, base-uri(), $p:index, ',
p:iteration-position(), ')')"/>
    </p:label-elements>
    <p:viewport match="//*:docx">
      <p:namespace-rename from="http://foo" to="http://bar"/>
    </p:viewport>
    <p:rename match="//*:docx" new-name="docy"/>
  </p:for-each>
</p:declare-step>
Received on Tuesday, 23 November 2010 08:02:54 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 23 November 2010 08:02:55 GMT