Skip to content

Commit

Permalink
Example of base direction namespace inline
Browse files Browse the repository at this point in the history
  • Loading branch information
afs committed Dec 27, 2024
1 parent 3ca89f9 commit efb7f09
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions spec/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -604,6 +604,38 @@ <h4>Variable Binding Results</h4>
&lt;/results&gt;

&lt;/sparql&gt;
</pre>

<p>
As an alternative to including the `xml:its` declaration in every result
set, the namespace can be declared on specific elements as needed:
</p>

<pre class="box xml">&lt;?xml version="1.0"?&gt;
&lt;sparql xmlns="http://www.w3.org/2005/sparql-results#"&gt;
&lt;head&gt;
&lt;variable name="animal"/&gt;
&lt;/head&gt;
&lt;results&gt;
&lt;result&gt;
&lt;binding name="animal"&gt;
&lt;literal xmlns:its="http://www.w3.org/2005/11/its" its:version="2.0"
xml:lang="ar" its:dir="rtl"&gt;قطة&lt;/literal&gt;
&lt;/binding&gt;
&lt;/result&gt;
&lt;result&gt;
&lt;binding name="animal"&gt;
&lt;literal xml:lang="en"&gt;cat&lt;/literal&gt;
&lt;/binding&gt;
&lt;/result&gt;
&lt;result&gt;
&lt;binding name="animal"&gt;
&lt;literal xmlns:its="http://www.w3.org/2005/11/its" its:version="2.0"
xml:lang="fr" its:dir="ltr"&gt;chat&lt;/literal&gt;
&lt;/binding&gt;
&lt;/result&gt;
&lt;/results&gt;
&lt;/sparql&gt;
</pre>
</section>

Expand Down

0 comments on commit efb7f09

Please sign in to comment.