1
***********************************************************
2
************** XPath (patterns) ***************************
3
***********************************************************
4
�ᯮ������ � xslt ��� �롮� 㧫�� ��� ��ࠡ�⪨, �����樨 ��ப
5
����頥��� � १����, etc...
10
.. paren த�⥫�᪨ �������
11
/ root ����� ������� (if standalone)
12
/ child ���୨� ��������(1�� ���������)
13
* �� 㧫� (if standalone)
15
// descentant-or-self .|*
16
ancestor �� ���� த�⥫�᪨� 㧫�
17
ancestor-or-self .|ancestor
23
@ attribute ���ਡ�� ⥪�饣� 㧫�
25
"name" ���� � ����� ������
28
comment() ���樠��� 㧫� ������ਥ�
29
processing-instriction() ���� �ᯮ��塞�� ������
33
��ࠢ� �� �����䨪��, ����� ���� �।�����:
34
author[1] ���� 㧥� � ⠪�� ������
35
author[$any$ FirstName="..."] ����騩 ���� ���� ���㧥� � ⠪�� ������ �
37
author[$all$ FirstName="..."] ����騥 㪠����� ���祭��, ��� ��� 㧫�� �
39
author[FirstName="..."] $any$
40
author[FirstName] ����騥 㪠����� ���㧥�
44
author[@id=2] ���� � 㪠���� ���ਡ�⮬ ࠢ�� 2
45
book[$any$ author="Kain"] �����, �।� ��� ������ Kain
46
book[$all$ author="Kain"] �����, �� �� ��� ������ Kain
51
/DOCUMENT/CHAPTER/SECTION[position()=1] �㤥� �������� ���� ࠧ����
53
(/DOCUMENT/CHAPTER/SECTION)[position()=1] ���� �� ���浪� ࠧ��� �
58
����� ���� XML ���㬥��:
64
�� ����� ��ࠡ��뢠���� � ������� ���饣� xsl(�. AVT):
65
<xsl:template match="hell">
66
<img src="{url}" width="{size/@width}"/>
69
����� ���饭��, � ���� ���쪮 㧫�� � ����� � ⥬ �� ������, �