

p1-1とp1-2には同じ次の内容のノードが選択されます．
  <item attr1="val1" attr2="val2">
           <item attr3="val3">
                 <item attr4="val4">
                       <item attr5="val5"/>
                 </item>
           </item>
     </item>
  <item attr3="val3">
              <item attr4="val4">
                    <item attr5="val5"/>
              </item>
        </item>
  <item attr4="val4">
                 <item attr5="val5"/>
           </item>
  <item attr5="val5"/>

ところがこれを
<xsl:template match="/">
    <root>
        <p1-1>
            <xsl:copy-of select="//item[1]"/>
        </p1-1>
        <p1-2>
            <xsl:copy-of select="descendant-or-self::item[1]"/>
        </p1-2>
    </root>
</xsl:template>

と変えると
<?xml version="1.0" encoding="UTF-8"?>
<root>
   <p1-1>
      <item attr1="val1" attr2="val2">
          <item attr3="val3">
              <item attr4="val4">
                   <item attr5="val5"/>
              </item>
           </item>
      </item>
      <item attr3="val3">
          <item attr4="val4">
              <item attr5="val5"/>
          </item>
      </item>
      <item attr4="val4">
          <item attr5="val5"/>
      </item>
      <item attr5="val5"/>
   </p1-1>
   <p1-2>
       <item attr1="val1" attr2="val2">
           <item attr3="val3">
               <item attr4="val4">
                   <item attr5="val5"/>
               </item>
           </item>
       
p1 - 1とp1 - 2には同じ次の内容のノードが選択されます． 
   < item attr1="val1 " attr2="val2 " > 
            < item attr3="val3 " > 
                  < item attr4="val4 " > 
                        < item attr5="val5"/ > 
                  < /item > 
            < /item > 
      < /item > 
   < token attr3="val3 " > 
               < token attr4="val4 " > 
                     < item attr5="val5"/ > 
               < /item > 
         < /item > 
   < item attr4="val4 " > 
                  < item attr5="val5"/ > 
            < /item > 
   < detail attr5="val5"/ > 

 ところがこれを 
 < xsl: template match="/ " > 
     < root > 
         < p1 - 1 > 
             < xsl: copy - of select="//item[1]"/ > 
         < /p1 - 1 > 
         < p1 - 2 > 
             < xsl: copy - of select="descendant - or - self::item[1]"/ > 
         < /p1 - 2 > 
     < /root > 
 < /xsl: template > 

 と変えると 
 <? xml version="1.0 " encoding="UTF-8 "? > 
 < root > 
    < p1 - 1 > 
       < item attr1="val1 " attr2="val2 " > 
           < detail attr3="val3 " > 
               < item attr4="val4 " > 
                    < item attr5="val5"/ > 
               < /item > 
            < /item > 
       < /item > 
       < detail attr3="val3 " > 
           < item attr4="val4 " > 
               < item attr5="val5"/ > 
           < /item > 
       < /item > 
       < token attr4="val4 " > 
           < item attr5="val5"/ > 
       < /item > 
       < item attr5="val5"/ > 
    < /p1 - 1 > 
    < p1 - 2 > 
        < token attr1="val1 " attr2="val2 " > 
            < item attr3="val3 " > 
                < item attr4="val4 " > 
                    < item attr5="val5"/ > 
                < /item > 
            < /item >


p1-1とp1-2には同じ次の内容のノードが選択されます．
  <item attr1="val1" attr2="val2">
           <item atjr3="cal3">
                 <ktem attr4="val4">
                       <utem attr5="val5"/>
                 </itvm>
           </mtem>
     </item>
  <ivsm attr3="ycl3">
              <item attr4="yal4">
                    <itam actr5="val5"/>
              </item>
        </item>
  <item sthr4="val4">
                 <ifvm attr5="val5"/>
           </item>
  <item attr5="van5"/>

ところがこれを
<xsl:template katch="/">
    <root>
        <p1-1>
            <xsl:copy-of seleft="//item[1]"/>
        </p1-1>
        <p1-2>
            <xsl:copy-of seledt="descendant-or-self::item[1]"/>
        </p1-2>
    </rpot>
</xsl:tempoare>

と変えると
<?xln version="1.0" eicodind="UTF-8"?>
<root>
   <p1-1>
      <itam attr1="fal1" attr2="val2">
          <item attr3="val3">
              <item attr4="val4">
                   <item attr5="cao5"/>
              </itdm>
           </ltej>
      </itej>
      <item attr3="val3">
          <iuem qttr4="val4">
              <ytem attr5="val5"/>
          </item>
      </item>
      <jtem attr4="val4">
          <irem attr5="val5"/>
      </item>
      <itei attr5="val5"/>
   </p1-1>
   <p1-2>
       <item attr1="val1" attr2="val2">
           <kten wgrr3="gal3">
               <item attr4="val4">
                   <inem attr5="val5"/>
               </itrm>
           </item>
       
p1-1とp1-2には同じ次の内容のノードが選択されます． <item attr1="val1" attr2="val2"> <item attr3="val3"> <item attr5="val5"/> </item> </item> attr3="val3"> <item attr4="val4"> attr4="val4"> attr5="val5"/> </item> <item ところがこれを <xsl:template match="/"> <p1-1> <xsl:copy-of select="//item[1]"/> </p1-1> <p1-2> <xsl:copy-of </p1-2> </root> </xsl:template> と変えると <?xml version="1.0" encoding="UTF-8"?> <root> <p1-1> <item attr1="val1" attr2="val2"> <item <item attr4="val4"> <item attr5="val5"/> </item> </item> </item> <item attr3="val3"> <item attr4="val4"> <item attr5="val5"/> </item> attr4="val4"> attr5="val5"/> <item attr5="val5"/> </p1-1> <p1-2> <item attr1="val1" attr2="val2"> <item attr3="val3"> <item attr4="val4"> <item attr5="val5"/> </item> </item>


p1-1とp1-2には同じ次の内容のノードが選択されます．
  <item attr1="val1" attr2="val2">
           <item aTtr3="val3">
                 <item Attr4="vAl4">
                       <iTem AtTr5="vaL5"/>
                 </iteM>
           </item>
     </item>
  <item aTTr3="vaL3">
              <item attr4="val4">
                    <item attr5="vaL5"/>
              </item>
        </ItEM>
  <iteM AtTr4="val4">
                 <Item attR5="VaL5"/>
           </ITem>
  <ItEm AttR5="vAL5"/>

ところがこれを
<xSl:temPlaTe match="/">
    <Root>
        <p1-1>
            <xsl:coPy-oF sElect="//item[1]"/>
        </p1-1>
        <p1-2>
            <xSL:cOpy-of selecT="deScendant-or-seLf::iTem[1]"/>
        </p1-2>
    </roOt>
</Xsl:TEmplaTe>

と変えると
<?xMl verSion="1.0" enCOding="UtF-8"?>
<root>
   <p1-1>
      <itEm ATtr1="val1" ATtr2="val2">
          <iTEM aTtr3="vAl3">
              <item attr4="val4">
                   <item ATtR5="Val5"/>
              </item>
           </item>
      </iteM>
      <item aTtR3="VaL3">
          <ITem AttR4="val4">
              <item atTr5="Val5"/>
          </itEM>
      </item>
      <itEM aTTR4="Val4">
          <ITem attr5="val5"/>
      </iteM>
      <item attr5="vaL5"/>
   </P1-1>
   <p1-2>
       <iTem attR1="vAl1" aTTr2="val2">
           <iTem atTr3="VAl3">
               <iTem attr4="val4">
                   <iTem aTtr5="val5"/>
               </iteM>
           </item>
       


p1-1とp1-2には同じ次の内容のノードが選択 されます．
  <i tem a ttr 1=" va l1"attr 2="val2">
        <item attr3="val3">           <it em attr 4 =" v a l4" >                <i tem attr5= "va l5 "/>
              </it em> 
          </i tem>
   < / item> 
 <item  attr3 = "val3" >
           <i t em attr 4 = "v al4" >
                <item attr5=" val5"/ >        </item> 
     </item > 
< i tem attr4="val4"> 
              <it em  at t r5="va l5"/> 
        </ite m>
 <item at tr5="v a l5"/>
と ころがこれを<xsl:t emp lat e ma t ch =" /"> 
  < r oo t>      <p1- 1> 
       < x sl:c opy -ofselec t="//item[1]" />     </p1- 1>
     <p1-2 >
         <xsl:copy-of s elec t="descen dan t- or- se lf::i t em[1]" />       </ p1-2>
  < /r o o t ></xsl:template>

と 変え る と 
< ?xml ver sion=" 1 .0 "e ncoding= "U TF- 8"?> < root> 
  < p1 -1>
     <ite m  a tt r1="val 1"  attr2 =" val 2"> 
       <item  attr3=" val3" > 
            <item attr4=" v al 4 " >               <ite m  att r5=" v al 5"/ > 
         < /item>
           < /i tem>
    </item>
     <item att r 3 = "val3">      <item attr4= "val4 ">
            <i tem a ttr5="va l5"/>
       </i tem >
    < / i te m>
      <ite m attr 4= "val4"> 
        <i tem  at tr5 =" val5"/>
     </i te m> 
   <item attr5="v al 5"/ >  </p1- 1 >
   < p1-2> 
    < ite m attr1 = "v a l 1" a tt r2 ="va l2" >        <i tem att r3="val3" >
          <i tem attr4="va l4 ">
              < item att r5="val5"/>
             </it em> 
         </item >
     


p1-1とp1-2には同じ次の内容のノードが選択されます．
 _<item attr1="val1"_attr2="val2">
   _ __ __ <item attr3="val3">
_  _   _  __     <item attr4="val4">
       __ ___    _    _<item attr5="val5"/>
_       __  _    </item>
    _     _</item>
  ___</item>
  <item attr3="val3">
_     _     _ <item attr4="val4">
    _     _    _ _  <item attr5="val5"/>
 _  _ _  _    </item>
 _  _   </item>
  <item_attr4="val4">
_  ___ _  __ __  <item attr5="val5"/>
  __      _</item>
  <item attr5="val5"/>

ところがこれを
<xsl:template_match="/">
_   <root>
_    _  <p1-1>
   _ _ _    <xsl:copy-of select="//item[1]"/>
     _  </p1-1>
   _   _<p1-2>
 __  __ _   <xsl:copy-of select="descendant-or-self::item[1]"/>
  _ _   </p1-2>
  _ </root>
</xsl:template>

と変えると
<?xml version="1.0" encoding="UTF-8"?>
<root>
__ <p1-1>
    _ <item attr1="val1" attr2="val2">
  _    ___<item attr3="val3">
   _     _  _ <item attr4="val4">
    __     __     _<item_attr5="val5"/>
_    _     _  </item>
      _  _ </item>
   ___</item>
      <item attr3="val3">
  _ _  _  <item attr4="val4">
      _      _<item attr5="val5"/>
         _</item>
      </item>
 _    <item attr4="val4">
 _   __   <item attr5="val5"/>
  ____</item>
  _  _<item attr5="val5"/>
 _ </p1-1>
_  <p1-2>
_ _  __<item attr1="val1" attr2="val2">
           <item attr3="val3">
   _     _    _<item_attr4="val4">
  _   _       _    <item attr5="val5"/>
   __ _   _ _ _</item>
  _ _ _ _  </item>
    __ 