<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>3008</bug_id>
          
          <creation_ts>2006-03-15 21:49:23 +0000</creation_ts>
          <short_desc>Error in example 18</short_desc>
          <delta_ts>2006-07-24 10:25:58 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>ITS</product>
          <component>ITS techniques</component>
          <version>WorkingDraft</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows XP</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Jirka Kosek">jirka</reporter>
          <assigned_to name="Felix Sasaki">fsasaki</assigned_to>
          
          
          <qa_contact name="Felix Sasaki">fsasaki</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>8743</commentid>
    <comment_count>0</comment_count>
    <who name="Jirka Kosek">jirka</who>
    <bug_when>2006-03-15 21:49:23 +0000</bug_when>
    <thetext>Error in example 18.

 &lt;its:documentRule its:translateSelector=&quot;//*[@dita:translate=&apos;yes&apos;]&quot; 
        its:translate=&quot;yes&quot;/&gt;
      &lt;its:documentRule its:translateSelector=&quot;//*[@dita:translate=&apos;no&apos;]&quot; 
        its:translate=&quot;no&quot;/&gt;

Attribute translate is not in dita namespace and should not be prefixed in XPath expressions above.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>8877</commentid>
    <comment_count>1</comment_count>
    <who name="Felix Sasaki">fsasaki</who>
    <bug_when>2006-03-27 06:19:56 +0000</bug_when>
    <thetext>(In reply to comment #0)
&gt; Error in example 18.
&gt; 
&gt;  &lt;its:documentRule its:translateSelector=&quot;//*[@dita:translate=&apos;yes&apos;]&quot; 
&gt;         its:translate=&quot;yes&quot;/&gt;
&gt;       &lt;its:documentRule its:translateSelector=&quot;//*[@dita:translate=&apos;no&apos;]&quot; 
&gt;         its:translate=&quot;no&quot;/&gt;
&gt; 
&gt; Attribute translate is not in dita namespace and should not be prefixed in
&gt; XPath expressions above.
&gt; 
Hi Jirka,

The attribute *is* in the DITA namespace. The default namespace of the document is the DITA namespace. However, only inside the &lt;documentRules&gt; element we use a prefix, via a schematron like namespace binding mechanism.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>8878</commentid>
    <comment_count>2</comment_count>
    <who name="Jirka Kosek">jirka</who>
    <bug_when>2006-03-27 06:43:35 +0000</bug_when>
    <thetext>But default namespace is not applied to attributes, only to elements. See http://www.w3.org/TR/REC-xml-names/#defaulting </thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>8879</commentid>
    <comment_count>3</comment_count>
    <who name="Felix Sasaki">fsasaki</who>
    <bug_when>2006-03-27 07:00:11 +0000</bug_when>
    <thetext>(In reply to comment #2)
&gt; But default namespace is not applied to attributes, only to elements. See
&gt; http://www.w3.org/TR/REC-xml-names/#defaulting 
&gt; 
As I said, we are using a separate namespace binding mechanism, like schematron. IMO, we need to have attribute values with prefixes too. How would you otherwise describe the difference between
 &lt;its:documentRule its:translateSelector=&quot;//*[@dita:translate=&apos;yes&apos;]&quot; 
        its:translate=&quot;yes&quot;/&gt;
and
 &lt;its:documentRule its:translateSelector=&quot;//*[@xyz:translate=&apos;yes&apos;]&quot; 
        its:translate=&quot;yes&quot;/&gt;
I am assuming that both the vocabularies &quot;dita&quot; and &quot;xyz&quot; have a translate attribute.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>8880</commentid>
    <comment_count>4</comment_count>
    <who name="Jirka Kosek">jirka</who>
    <bug_when>2006-03-27 07:15:46 +0000</bug_when>
    <thetext>You are missing my point. Try to evaluate

//*[@dita:translate=&apos;yes&apos;]

over sample DITA instance you have in spec. You will see, that nothing is returned. If you need to target only DITA elements with translate attribute, use

//dita:*[@translate=&apos;yes&apos;]</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>8881</commentid>
    <comment_count>5</comment_count>
    <who name="Felix Sasaki">fsasaki</who>
    <bug_when>2006-03-27 07:23:24 +0000</bug_when>
    <thetext>(In reply to comment #4)
&gt; You are missing my point. Try to evaluate
&gt; 
&gt; //*[@dita:translate=&apos;yes&apos;]
&gt; 
&gt; over sample DITA instance you have in spec. You will see, that nothing is
&gt; returned. If you need to target only DITA elements with translate attribute,
&gt; use
&gt; 
&gt; //dita:*[@translate=&apos;yes&apos;]
&gt; 

How would you write an XPath expression (using the ITS namespace binding mechanism) that gives you all DITA elements, with a translate attribute with the value &quot;yes&quot; from a namespace XYZ? Would that be
//dita:*[@xyz:translate=&apos;yes&apos;]?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>8882</commentid>
    <comment_count>6</comment_count>
    <who name="Jirka Kosek">jirka</who>
    <bug_when>2006-03-27 07:29:28 +0000</bug_when>
    <thetext>Yes
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>8883</commentid>
    <comment_count>7</comment_count>
    <who name="Felix Sasaki">fsasaki</who>
    <bug_when>2006-03-27 07:34:00 +0000</bug_when>
    <thetext>(In reply to comment #6)
&gt; Yes
&gt; 

Then: How would you write an XPath expression (using the ITS namespace binding
mechanism) that gives you all elements (from any namespace), with a translate attribute with the value &quot;yes&quot; from a namespace XYZ?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>8884</commentid>
    <comment_count>8</comment_count>
    <who name="Jirka Kosek">jirka</who>
    <bug_when>2006-03-27 07:38:02 +0000</bug_when>
    <thetext>//*[@xyz:translate = &apos;yes&apos;]

Please note that the following two documents are *not* same:

&lt;x:a xmlns:x=&quot;foo&quot;&gt;
  &lt;x:b x:c=&quot;bar&quot;/&gt;
&lt;/x:a&gt;

&lt;a xmlns=&quot;foo&quot;&gt;
  &lt;b c=&quot;bar&quot;/&gt;
&lt;/a&gt;

In the first sample attribute &quot;c&quot; is in &quot;foo&quot; namespace (via &quot;x&quot; prefix). In the second example attribute &quot;c&quot; is in no namespace.
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>8885</commentid>
    <comment_count>9</comment_count>
    <who name="Felix Sasaki">fsasaki</who>
    <bug_when>2006-03-27 07:56:41 +0000</bug_when>
    <thetext>(In reply to comment #8)
&gt; //*[@xyz:translate = &apos;yes&apos;]
&gt; 
&gt; Please note that the following two documents are *not* same:
&gt; 
&gt; &lt;x:a xmlns:x=&quot;foo&quot;&gt;
&gt;   &lt;x:b x:c=&quot;bar&quot;/&gt;
&gt; &lt;/x:a&gt;
&gt; 
&gt; &lt;a xmlns=&quot;foo&quot;&gt;
&gt;   &lt;b c=&quot;bar&quot;/&gt;
&gt; &lt;/a&gt;
&gt; 
&gt; In the first sample attribute &quot;c&quot; is in &quot;foo&quot; namespace (via &quot;x&quot; prefix). In
&gt; the second example attribute &quot;c&quot; is in no namespace.
&gt; 

O.K., so the error is not in the XPath expression but in the instance, which should say

&lt;ph its:translate=&quot;no&quot; xml:lang=&quot;fr&quot;&gt;Et voilà !&lt;/ph&gt; The last rule wins

whereas the XPath expression in the documentRule still will be

//*[@dita:translate=&apos;no&apos;]

Note that we reserve in our description of namespace binding in documentRule(s) names without a prefix for the &quot;no namespace&quot; case.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>8903</commentid>
    <comment_count>10</comment_count>
    <who name="Jirka Kosek">jirka</who>
    <bug_when>2006-03-27 14:20:51 +0000</bug_when>
    <thetext>No, sample document is OK, because DITA has its own translate attribute. The problem is in XPath expression, which should be either:

//*[@translate=&apos;yes&apos;]

or

//dita:*[@translate=&apos;yes&apos;]

depending whether you are expecting foreign elements in DITA instances.

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>9074</commentid>
    <comment_count>11</comment_count>
    <who name="Yves Savourel">ysavourel</who>
    <bug_when>2006-04-07 19:34:56 +0000</bug_when>
    <thetext>
Resolve

(This is Example 15 in current draft
Titled &quot;Mapping of the ITS data categories translatability and terminology to [Dita 1.0] markup&quot;)

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>10675</commentid>
    <comment_count>12</comment_count>
    <who name="Felix Sasaki">fsasaki</who>
    <bug_when>2006-07-24 10:25:58 +0000</bug_when>
    <thetext>Closed, no further action necessary.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>