From efb7f0921376a92d839d741e02a1dcaef1c19bcb Mon Sep 17 00:00:00 2001 From: Andy Seaborne Date: Fri, 20 Dec 2024 10:18:50 +0000 Subject: [PATCH] Example of base direction namespace inline --- spec/index.html | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/spec/index.html b/spec/index.html index 4317ecf..34388c2 100644 --- a/spec/index.html +++ b/spec/index.html @@ -604,6 +604,38 @@

Variable Binding Results

</results> </sparql> + + +

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

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