<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="11" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[11]</anchor-end> <dfn>XPath 1.0データモデル</dfn>は、 <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">XPath 1.0</anchor> が採用している <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">XML文書</anchor>の内部表現形式です。
<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">XPath 1.0</anchor> の他、 <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">XPath 1.0</anchor> を採用する <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">XSLT 1.0</anchor> などの言語で使われています。</p><section><h1>節点木データモデル</h1><section><h1>元々の XPath 1.0</h1><ed xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:10:"></ed></section><section><h1>DOM XPath のデータモデル</h1><history xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:"><p xmlns="http://www.w3.org/1999/xhtml"><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="15" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[15]</anchor-end> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">DOM3 XPath</anchor> は <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">DOM</anchor> を <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">XPath 1.0データモデル</anchor>に合わせるため<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">名前空間節点</anchor>を
<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">DOM</anchor> に追加するなどしていますが、実装には無視されていました。</p></history><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="3" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[3]</anchor-end> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Chrome</anchor>、<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Firefox</anchor> とも <code class="DOMi" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">DocumentType</anchor></code> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">節点</anchor>が存在します。
<code class="XPathFunction" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">string()</anchor></code> や <code class="XPathFunction" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">name()</anchor></code>
は<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">空文字列</anchor>になります。 <time>2013-09-28T13:03:13.400Z</time></p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="7" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[7]</anchor-end> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">根節点</anchor>の扱いについては、<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">根節点</anchor>の項を参照してください。</p></section><section><h1>XSLT のデータモデル</h1><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="8" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[8]</anchor-end> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">根節点</anchor>の拡張については、<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">根節点</anchor>の項を参照してください。</p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="16" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[16]</anchor-end> 
<code>template</code> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">要素</anchor>の扱いは、
<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">DOM XPath</anchor> と <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">XSLT 1.0</anchor> とで異なっています。
<sw-see xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:"> <code xmlns="http://www.w3.org/1999/xhtml">template</code> </sw-see></p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="4" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[4]</anchor-end> <cite xml:lang="EN">XSL Transformations (XSLT) Version 1.1</cite> (<time>2001-08-24 14:35:28 +09:00</time> 版) <anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="http://www.w3.org/TR/xslt11/#N11359">http://www.w3.org/TR/xslt11/#N11359</anchor-external></p><figure class="quote"><figcaption><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="13" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[13]</anchor-end> <cite xml:lang="en">RFC 7950 - The YANG 1.1 Data Modeling Language</cite>
(<time>2016-09-15 03:32:37 +09:00</time>)
<anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="https://tools.ietf.org/html/rfc7950#section-6.4">https://tools.ietf.org/html/rfc7950#section-6.4</anchor-external></figcaption><blockquote><p>The data model used in the XPath expressions is the same as that used
in XPath 1.0 <strong>[</strong>XPATH<strong>]</strong>, with the same extension for root node children
as used by XSLT 1.0 (see Section 3.1 in <strong>[</strong>XSLT<strong>]</strong>).  Specifically, it
means that the root node may have any number of element nodes as its
children.</p></blockquote></figure></section><section><h1>XPointer</h1><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="9" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[9]</anchor-end> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">根節点</anchor>の拡張については、<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">根節点</anchor>の項を参照してください。</p></section><section><h1>XForms</h1><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="5" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[5]</anchor-end> <cite xml:lang="EN">XForms 1.1</cite> (<time>2010-08-12 22:45:33 +09:00</time> 版) <anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="http://www.w3.org/TR/xforms/#expr-instance">http://www.w3.org/TR/xforms/#expr-instance</anchor-external></p></section><section><h1>X#</h1><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="2" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[2]</anchor-end> <cite>X Sharp/Data Types</cite> (<time>2009-01-22 20:51:58 +09:00</time> 版) <anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="http://wiki.codeglide.com/X_Sharp/Data_Types#Node">http://wiki.codeglide.com/X_Sharp/Data_Types#Node</anchor-external></p><blockquote><p>The X# Document Object Model implementation supports all six XML node types:<ul><li>Element</li><li>Attribute</li><li>Text (Unicode and Binary text nodes are permitted)</li><li>Namespace</li><li>Comment</li><li>Processing Instruction </li></ul></p></blockquote><p>「Binary text nodes」</p></section></section><section><h1>データ型</h1><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="14" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[14]</anchor-end> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">XPath 1.0</anchor> には次の<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">データ型</anchor>があります。</p><figure class="short list"><ul><li><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">節点集合</anchor></li><li><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">文字列<title xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:10:">XPath 1.0文字列</title></anchor></li><li><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">数値</anchor></li><li><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">boolean</anchor></li></ul></figure></section><section><h1>歴史</h1><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="12" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[12]</anchor-end> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">XPath 1.0データモデル</anchor>は、 <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">XML情報集合</anchor>の設計上のベースとなった<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">データモデル</anchor>の1つです。</p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="10" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[10]</anchor-end> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">XPath 2.0</anchor>/<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">XSLT 2.0</anchor> 以降は <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">XDM</anchor> を使っています。 <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">XDM</anchor>
は <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">XPath 1.0のデータモデル</anchor>をベースにしているようですが、大きく変更されています。</p></section><section><h1>実装</h1><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="6" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[6]</anchor-end> <cite xml:lang="en">760029 – XPath expression `//node()` shouldn’t match the DOCTYPE node</cite>
( (<time>2013-11-01 00:08:53 +09:00</time> 版))
<anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="https://bugzilla.mozilla.org/show_bug.cgi?id=760029">https://bugzilla.mozilla.org/show_bug.cgi?id=760029</anchor-external></p></section><section><h1>メモ</h1><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="1" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[1]</anchor-end> <pre>DataModel:
  @FullName:
    @@lang:en
    @@@:
      XPath 1.0 Data Model
  
  @ImplNote:
    @@lang:en
    @@@:
      A namespace URI of an expanded-name should be resolved 
      to an absolute URI reference.
      \
      {P:: Two expanded-names are equal if:
         \
         - they have the same local part and
         \
         - both have a null namespace URI or  
           both have non-null namespace URIs that are equal.
         \
      }
  @ImplNote:
    @@lang:en
    @@@:
      {LI:: <anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="DFN" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="document order">DFN:document order</anchor-external>:: The order in which the first 
        character of the XML representation of each node 
        occurs in the document after expansion of general entities. 
        \
        - The attribute nodes and namespace nodes occur before 
          the children of the element.
        \
        - The namespace nodes occur before the attribute nodes.
        \
        - The relative order of namespace nodes and the attribute nodes 
          is implementation-dependent.
        \
      }
      \
      - <anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="DFN" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="reverse document order">DFN:reverse document order</anchor-external>:: The reverse of document order.
  @ImplNote:
    @@lang:en
    @@@:
      - <anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="DFN" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="descendants">DFN:descendants</anchor-external>:: The children of the node and 
                            the descendants of the children.
  
  @InfoItem:
    @@FullName:
      @@@lang:en
      @@@@: root node
    @@Description:
      @@@lang:en
      @@@@:
        The root of the tree.  A root node does not occur except 
        as the root of the tree.
    @@Prop:
      @@@Description:
        @@@@lang:en
        @@@@@: An ordered list of child nodes.
    @@Prop:
      @@@Name:string-value
      @@@Description:
        @@@@lang:en
        @@@@@:
          The concatenation of the <anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="CODE" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="string-value">CODE:string-value</anchor-external>s of all 
          text node descendants of the root node in document order.
  
  @InfoItem:
    @@FullName:
      @@@lang:en
      @@@@:element node
    @@InfoProp:
      @@@Name:expanded-name
      @@@Description:
        @@@@lang:en
        @@@@@:
          Computed by expanding the <anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="CODE" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="QName">CODE:QName</anchor-external> of the element 
          specified in the tag.  The namespace URI will be null 
          if the <anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="CODE" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="QName">CODE:QName</anchor-external> has no prefix and there is no 
          applicable default namespace.
    @@InfoProp:
      @@@Name:children
      @@@Description:
        @@@@lang:en
        @@@@@:
          An ordered list of child nodes.  Note that entity references 
          are expanded and character references are resolved.
    @@InfoProp:
      @@@Name:string-value
      @@@Description:
        @@@@lang:en
        @@@@@:
          The concatenation of the <anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="CODE" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="string-value">CODE:string-value</anchor-external>s of all 
          text node descendants in document order.
    @@InfoProp:
      @@@FullName:
        @@@@lang:en
        @@@@@: unique identifier
      @@@Description:
        @@@@lang:en
        @@@@@:
          The DTD-determined ID value.  Note that if an XML processor 
          reports two elements in a document as having the same unique 
          ID, the second element in document order must be treated 
          as not having a unique ID.
    @@InfoProp:
      @@FullName:
        @@@lang:en
        @@@@:parent

  @InfoItem:
    @@FullName:
      @@@lang:en
      @@@@:attribute node
    @@InfoProp:
      @@@FullName:
        @@@@lang:en
        @@@@@:parent
      @@@Description:
        @@@@lang:en
        @@@@@:
          The owner element.  Note that an attribute node is not 
          a child of the parent element.
    @@ImplNote:
      @@@lang:en
      @@@@:
        Default attributes are treated the same as specified ones.
    @@InfoProp:
      @@@FullName:
        @@@@lang:en
        @@@@@:expanded-name
      @@@Description:
        @@@@lang:en
        @@@@@:
          Computed by expanding the <anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="CODE" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="QName">CODE:QName</anchor-external> specified in the tag. 
          The namespace URI will be null if the <anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="CODE" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="QName">CODE:QName</anchor-external> does 
          not have a prefix.
    @@InfoProp:
      @@@FullName:
        @@@@lang:en
        @@@@@:string-value
      @@@Description:
        @@@@lang:en
        @@@@@:
          The normalized value.  Note that is might be a zero-length string.

  @InfoItem:
    @@FullName:
      @@@lang:en
      @@@@:namespace node
    @@Description:
      @@@lang:en
      @@@@:
        In-scope namespace declarations, including implied 
        <anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="XML" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="xml">XML:xml</anchor-external> namespace declaration.
        \
        {NOTE:: An <anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="XML" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="xmlns=&quot;&quot;">XML:xmlns=&quot;&quot;</anchor-external> attribute undeclares the 
                default namespace; that element and its 
                descendants have no default namespace node.
        \
        }
    @@InfoProp:
      @@@FullName:
        @@@@lang:en
        @@@@@:parent
      @@@Description:
        @@@@lang:en
        @@@@@:
          The owner element.  Note that a namespace node is not a 
          child of the parent element.
    @@InfoProp:
      @@@FullName:
        @@@@lang:en
        @@@@@:expanded-name
      @@@Description:
        @@@@lang:en
        @@@@@:
          The local part is the namespace prefix or empty if 
          the namespace node is for the default namespace.  
          The namespace URI is always null.
    @@InfoProp:
      @@@FullName:
        @@@@lang:en
        @@@@@:string-value
      @@@Description:
        @@@@lang:en
        @@@@@:
          The namespace URI bound to the prefix.  If it is a relative 
          URI, it must be resolved.

  @InfoItem:
    @@FullName:
       @@@lang:en
       @@@@:processing instruction node
    @@InfoProp:
      @@@FullName:
        @@@@lang:en
        @@@@@:parent
    @@InfoProp:
      @@@FullName:
        @@@@lang:en
        @@@@@:expanded-name
      @@@Description:
        @@@@lang:en
        @@@@@:
          The local part is the target.  The namespace URI is null.
    @@InfoProp:
      @@@FullName:
        @@@@lang:en
        @@@@@:string-value
      @@@Description:
        @@@@lang:en
        @@@@@:
          The target data (following the target name and any white space).

  @InfoItem:
    @@FullName:
      @@@lang:en
      @@@@:comment node
    @@InfoProp:
      @@@FullName:
        @@@@lang:en
        @@@@@:parent
    @@InfoProp:
      @@@FullName:
        @@@@lang:en
        @@@@@:string-value
      @@@Description:
        @@@@lang:en
        @@@@@:
          The content of the comment.
  @InfoItem:
    @@FullName:
      @@@lang:en
      @@@@:text node
    @@InfoProp:
      @@@FullName:
        @@@@lang:en
        @@@@@:parent
    @@InfoProp:
      @@@FullName:
        @@@@lang:en
        @@@@@:string-value
      @@@Description:
        @@@@lang:en
        @@@@@:
          The character data, always has at least one character.</pre></p></section></body></html>