XSLT�e���v���[�g���C���N���[�h�����FXML�e�N�j�b�N�W�i6�j�i1/3 �y�[�W�j

» 2003�N10��17�� 10��00�� ���J
[�R�c�ˊ��C��IT]

XSLT�e���v���[�g���C���N���[�h����

�A�C�R��

�J��Ԃ��g������XSLT�X�^�C���V�[�g��ʃt�@�C���Ƃ��ėp�ӂ��Ă����A<xsl:include>�v�f���g�p���ĐV�K�ɍ쐬����XSLT�X�^�C���V�[�g�ɓ���������@��������܂��B

�J�e�S�� XSLT
�֘A�v�f <xsl:include>
�֘A�L�� XSLT�e���v���[�g���C���|�[�g����

�@XSLT�X�^�C���V�[�g�Ƃ́A�����̃e���v���[�g����\�������u�e���v���[�g�W�v�ł���Ƃ����܂��B�P���Ȃ��̂��畡�G�Ȃ��̂܂ŁA���܂��܂ȃe���v���[�g���쐬���Ă����ƁA�ꕔ�̃e���v���[�g���ė��p�������Ǝv���悤�ɂȂ���̂ł��B

�@�J�����Y���Ƃ����ϓ_���炢���Ȃ�΁A�ė��p�”\�ȃe���v���[�g��ʃt�@�C���Ƃ��ėp�ӂ��Ă����AXML�t�@�C���ƒ��ڂɃ}�b�s���O����̂́A�e���v���[�g���Ăяo���u�R���g���[���v�̖�����������XSLT�X�^�C���V�[�g�ł���ׂ��Ȃ̂ł��B

�@�{�e�ł́AXSLT�v�f��1�‚ł���<xsl:include>�v�f���g�p���邱�ƂŁA�������ꂽXSLT�X�^�C���V�[�g�i�e���v���[�g�j�𓝍�����d�g�݂��Љ�܂��B

�@�ȉ��ł́A�ʍe�u���͂̈ꕔ�������������ŏo�͂����v�ŏЉ��description.xsl����A�����\���𐧌䂷��e���v���[�g������؂�o���āAinclude.xsl�Ƃ��ĊO���t�@�C�������Ă݂邱�Ƃɂ��܂��B

�mdescription.xsl�n

<?xml version="1.0" encoding="Shift_JIS" ?>
<xsl:stylesheet
 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
 version="1.0">
  <xsl:template match="/">
    <html>
    <head>
    <title><xsl:value-of select="books/@name" /></title>
    </head>
    <body >
    <h1><xsl:value-of select="books/@name" /></h1>
    <dl>
    <xsl:for-each select="books/book">
      <xsl:sort select="published" data-type="text"
                order="descending" />
      <xsl:sort select="price" data-type="text"
                order="ascending" />
      <dt><h3><xsl:value-of select="title" />
        �i<xsl:value-of select="author" />�C
          <xsl:value-of select="published" />�C
          <xsl:value-of select="price" />�j</h3></dt>
      <dd>
        <xsl:apply-templates select="description" />
      </dd>
      <p><hr /></p>
    </xsl:for-each>
    </dl>
    </body>
    </html>
  </xsl:template>
  <xsl:include href="https://atmarkit.itmedia.co.jp/ait/articles/0310/17/include.xsl" />
</xsl:stylesheet>

�minclude.xsl�n

<?xml version="1.0" encoding="Shift_JIS" ?>
<xsl:stylesheet
 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
 version="1.0">
  <xsl:template match="keywd">
    <span style="font-weight:bold;">
      <xsl:value-of select="." />
    </span>
  </xsl:template>

  <xsl:template match="text()">
    <xsl:value-of select="." />
  </xsl:template>
</xsl:stylesheet>


�}�@&lt;keywd&gt;�v�f�ň͂܂ꂽ�����������\������� �}�@<keywd>�v�f�ň͂܂ꂽ�����������\�������

�@�X�^�C���V�[�g�̃��W�b�N���ꎩ�̂Ɋւ��ẮA�ʍe�u���͂̈ꕔ�������������ŏo�͂����v���Q�Ƃ��Ă��������B�O���t�@�C���������X�^�C���V�[�g�̎�荞�ݎ��̂͂ƂĂ��P���ŁA����<xsl:include>�v�f����荞�ݑ��̃X�^�C���V�[�g�ɋL�q���邾���ł��B

<xsl:include href="https://atmarkit.itmedia.co.jp/ait/articles/0310/17/include.xsl" />


�@���̕��@�Œ��ӂ��ׂ��Ƃ���́A<xsl:include>�v�f�͕K��<xsl:stylesheet>�v�f�̒����ɋL�q����K�v�������A�Ƃ����_�ł��B���̂ق��AXSLT�X�^�C���V�[�g�𕪊�����ꍇ�A���ӂ��ׂ��_���ȉ��ɋ����Ă������Ƃɂ��܂��傤�B

�i1�j�O���t�@�C���͊�������XSLT�X�^�C���V�[�g�ł��邱��

�@�X�^�C���V�[�g�𕪊�����ꍇ�A�悭����ԈႢ��<xsl:stylesheet>���L�q�����A�f�ГI�ȁi�s���S�ȁjXSLT���L�q���Ă��܂����Ƃł��B�C���N���[�h�Ƃ������t����A���̂܂܊O���t�@�C���̓��e��<xsl:include>�v�f�̈ʒu�ɖ��ߍ��܂��ƌ�����Ă�����������悤�ł����A����́u���v�ł��B

�@�O���t�@�C���������ꍇ�ɂ��A�O���t�@�C�����ꎩ�̂�1�‚̓Ɨ������X�^�C���V�[�g�Ƃ��Ċ������Ă���K�v������̂ł��B�]���āA�C���N���[�h����鑤�̃t�@�C���ɂ����Ă��A���[�g�v�f�ł���<xsl:stylesheet>�v�f�͏ȗ����邱�Ƃ��ł��܂���B

�i2�j�������[�v�𔭐�������悤�ȌĂяo���͋L�q���Ȃ�

�@����̗�ł����Ȃ�΁Ainclude.xsl����description.xsl���Ăяo���悤�ȍs�ׂł��B�O���t�@�C�����炳��ɕʂ̊O���t�@�C�����Ăяo�����Ƃ͉”\�ł����A���̂悤�Ɏ������g���Ăяo�������̃X�^�C���V�[�g���A�ēx�Ăяo���悤�ȋL�q�̓G���[�ƂȂ�܂��B

�@����̂悤�ȒP���ȗ�ł���ꍇ�ɂ́A���������ԈႢ���N����Ȃ��Ǝv���邩������܂��񂪁A���d�ɂ��t�@�C�����C���N���[�h���Ă���悤�ȃX�^�C���V�[�g�ł́A�ԐړI�Ȗ������[�v����������”\��������܂��B�Ⴆ�΁AA��B���AB��C���AC��A���Ăяo���Ƃ����悤�ȃP�[�X�ł��B�Ȃ��Ȃ��C�t���ɂ����G���[�ł��̂ŁA���ӂ��Ă��������B

�@�@�@�@�@�@ 1|2|3 ���̃y�[�W��

Copyright © ITmedia, Inc. All Rights Reserved.

�X�|���T�[����̂��m�点PR

���ڂ̃e�[�}

4AI by ��IT - AI�����A�������A���A������
Microsoft �� Windows�őO��2025
AI for �G���W�j�A�����O
���[�R�[�h�^�m�[�R�[�h �Z���g���� by ��IT - IT�G���W�j�A���r�W�l�X�̒��S�Ŋ��􂷂�g�D��
Cloud Native Central by ��IT - �X�P�[���u���Ȕ\�͂�g�D��
�V�X�e���J���m�E�n�E �y�����i�r�zPR
���Ȃ��ɂ������߂̋L��PR

RSS�ɂ‚���

�A�C�e�B���f�B�AID�ɂ‚���

���[���}�K�W���o�^

��IT�̃��[���}�K�W���́A �������A���ׂĖ����ł��B���Ѓ��[���}�K�W�������w�ǂ��������B