XSLT <xsl: namespace-alias>
❮ استكمال مرجع عنصر XSLT
التعريف والاستخدام
يتم استخدام العنصر <xsl: namespace-alias> لاستبدال مساحة اسم في ورقة الأنماط بمساحة اسم مختلفة في الإخراج.
ملاحظة: <xsl: namespace-alias> هو عنصر ذو مستوى أعلى ، ويجب أن يكون عقدة فرعية لـ <xsl: stylesheet> أو <xsl: transform>.
بناء الجملة
<xsl:namespace-alias
stylesheet-prefix="prefix|#default"
result-prefix="prefix|#default"/>
صفات
Attribute | Value | Description |
---|---|---|
stylesheet-prefix | prefix #default |
Required. Specifies the namespace you wish to change |
result-prefix | prefix #default |
Required. Specifies the desired namespace for the output |
مثال 1
يتم تحويل البادئة wxsl إلى بادئة xsl في الإخراج:
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:wxsl="https://www.w3schools.com/w3style.xsl">
<xsl:namespace-alias stylesheet-prefix="wxsl" result-prefix="xsl"/>
<xsl:template match="/">
<wxsl:stylesheet>
<xsl:apply-templates/>
</wxsl:stylesheet>
</xsl:template>
</xsl:stylesheet>
❮ استكمال مرجع عنصر XSLT