Skip to content

Commit efb7f09

Browse files
committed
Example of base direction namespace inline
1 parent 3ca89f9 commit efb7f09

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

spec/index.html

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -604,6 +604,38 @@ <h4>Variable Binding Results</h4>
604604
&lt;/results&gt;
605605

606606
&lt;/sparql&gt;
607+
</pre>
608+
609+
<p>
610+
As an alternative to including the `xml:its` declaration in every result
611+
set, the namespace can be declared on specific elements as needed:
612+
</p>
613+
614+
<pre class="box xml">&lt;?xml version="1.0"?&gt;
615+
&lt;sparql xmlns="http://www.w3.org/2005/sparql-results#"&gt;
616+
&lt;head&gt;
617+
&lt;variable name="animal"/&gt;
618+
&lt;/head&gt;
619+
&lt;results&gt;
620+
&lt;result&gt;
621+
&lt;binding name="animal"&gt;
622+
&lt;literal xmlns:its="http://www.w3.org/2005/11/its" its:version="2.0"
623+
xml:lang="ar" its:dir="rtl"&gt;قطة&lt;/literal&gt;
624+
&lt;/binding&gt;
625+
&lt;/result&gt;
626+
&lt;result&gt;
627+
&lt;binding name="animal"&gt;
628+
&lt;literal xml:lang="en"&gt;cat&lt;/literal&gt;
629+
&lt;/binding&gt;
630+
&lt;/result&gt;
631+
&lt;result&gt;
632+
&lt;binding name="animal"&gt;
633+
&lt;literal xmlns:its="http://www.w3.org/2005/11/its" its:version="2.0"
634+
xml:lang="fr" its:dir="ltr"&gt;chat&lt;/literal&gt;
635+
&lt;/binding&gt;
636+
&lt;/result&gt;
637+
&lt;/results&gt;
638+
&lt;/sparql&gt;
607639
</pre>
608640
</section>
609641

0 commit comments

Comments
 (0)