XSLT <xsl: copy>
❮ استكمال مرجع عنصر XSLT
التعريف والاستخدام
ينشئ العنصر <xsl: copy> نسخة من العقدة الحالية.
ملاحظة: يتم نسخ عُقد مساحة الاسم الخاصة بالعقدة الحالية تلقائيًا أيضًا ، ولكن لا يتم نسخ العقد الفرعية والسمات الخاصة بالعقدة الحالية تلقائيًا!
بناء الجملة
<xsl:copy use-attribute-sets="name-list">
<!-- Content:template -->
</xsl:copy>
صفات
Attribute | Value | Description |
---|---|---|
use-attribute-sets | name-list | Optional. A white space separated list of attribute-sets to apply to the output node, if the node is an element |
مثال 1
انسخ عقدة الرسالة إلى المستند الناتج:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="message">
<xsl:copy>
<xsl:apply-templates/>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>
❮ استكمال مرجع عنصر XSLT