diff options
| author | Ryan Johnson <rjohnson@mozilla.com> | 2021-04-29 16:16:42 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-04-29 16:16:42 -0700 |
| commit | 95aca4b4d8fa62815d4bd412fff1a364f842814a (patch) | |
| tree | 5e57661720fe9058d5c7db637e764800b50f9060 /files/ar/web/api/xsltprocessor/basic_example/index.html | |
| parent | ee3b1c87e3c8e72ca130943eed260ad642246581 (diff) | |
| download | translated-content-95aca4b4d8fa62815d4bd412fff1a364f842814a.tar.gz translated-content-95aca4b4d8fa62815d4bd412fff1a364f842814a.tar.bz2 translated-content-95aca4b4d8fa62815d4bd412fff1a364f842814a.zip | |
remove retired locales (#699)
Diffstat (limited to 'files/ar/web/api/xsltprocessor/basic_example/index.html')
| -rw-r--r-- | files/ar/web/api/xsltprocessor/basic_example/index.html | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/files/ar/web/api/xsltprocessor/basic_example/index.html b/files/ar/web/api/xsltprocessor/basic_example/index.html deleted file mode 100644 index 19e3b75c8f..0000000000 --- a/files/ar/web/api/xsltprocessor/basic_example/index.html +++ /dev/null @@ -1,57 +0,0 @@ ---- -title: مثال XSLT أساسي -slug: Web/API/XSLTProcessor/Basic_Example -tags: - - XSLT - - xsl -translation_of: Web/API/XSLTProcessor/Basic_Example ---- -<h2 dir="rtl" id="Basic_Example" name="Basic_Example">مثال أساسي</h2> - -<p dir="rtl">يوضح المثال الأول أساسيات تفعيل محول XSLT في المتصفح. سوف يقوم المثال على ملف XML يحتوي على معلومات (العنوان - قائمة المؤلفين - المحتوى) عن مقال. ثم يقوم بعرضه بهيئة صالحة للقراءة.</p> - -<p dir="rtl">يبين الشكل ١ مثال على شكل ملف المصدر الأساسي لـ XSLT. يحتوي ملف XML (example.xml) على معلومات حول المقال. وباستخدام أمر المعالجة <code>?xml-stylesheet?</code> يتم ربط ملف example.xml بملف XSLT عن طريق صفة href.</p> - -<p dir="rtl">تبدأ صحيفة أنماط XSLT بالمكون <code>xsl:stylesheet</code> الذي يحوي كل القوالب المستخدمة في إنشاء المُخرَج المطلوب. يحتوي المثال في الشكل ١ على قالبين، أحدهما يُطَبَّق على عقدة التَفَرُّع الرئيسية والآخر يُطَبَّق على عقدة <code>Author</code>. يقوم القالب الذي يُطَبَّق على عقدة التَفَرُّع الرئيسية بإخراج عنوان المقال، ثم يقوم بعدها باستدعاء باقي القوالب (عن طريق <code>apply-templates</code>) التي تطابق عقدة <code>Author</code> وتكون فرعية عنها.</p> - -<p dir="rtl">الشكل ١: مثال XSLT بسيط</p> - -<p dir="rtl">ملف XML (example.xml):</p> - -<pre class="brush:xml"><?xml version="1.0"?> -<?xml-stylesheet type="text/xsl" href="example.xsl"?> -<Article> - <Title>مقالي</Title> - <Authors> - <Author>السيد أحمد</Author> - <Author>السيد محمد</Author> - </Authors> - <Body>هنا محتوي مقالي.</Body> -</Article></pre> - -<p style="direction: rtl;">صحيفة أنماط XSL (example.xsl):</p> - -<pre class="brush:xml"><?xml version="1.0"?> -<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> - - <xsl:output method="text"/> - - <xsl:template match="/"> - Article - <xsl:value-of select="/Article/Title"/> - Authors: <xsl:apply-templates select="/Article/Authors/Author"/> - </xsl:template> - - <xsl:template match="Author"> - - <xsl:value-of select="." /> - </xsl:template> - -</xsl:stylesheet></pre> - -<p style="direction: rtl;">مُخرَج المتصفح:</p> - -<blockquote> -<p dir="rtl">مقال - مقالي<br> - المؤلفون:<br> - - السيد أحمد<br> - - السيد محمد</p> -</blockquote> |
