jena-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject jena git commit: JENA-816 : Write xsd:strings in XML attributes if requested.
Date Fri, 05 Dec 2014 15:10:21 GMT
Repository: jena
Updated Branches:
  refs/heads/master 107accb33 -> 7f6de894b


JENA-816 : Write xsd:strings in XML attributes if requested.

Use XML attributes for xsd:strings when the writer is set to use
XML attributes.  The default setup has always been not to.  It is only
enabled via chages to the blockRules.

Project: http://git-wip-us.apache.org/repos/asf/jena/repo
Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/7f6de894
Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/7f6de894
Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/7f6de894

Branch: refs/heads/master
Commit: 7f6de894b77f9ec6fdecdb54bc564966fba597af
Parents: 107accb
Author: Andy Seaborne <andy@apache.org>
Authored: Fri Dec 5 15:10:08 2014 +0000
Committer: Andy Seaborne <andy@apache.org>
Committed: Fri Dec 5 15:10:08 2014 +0000

----------------------------------------------------------------------
 .../java/com/hp/hpl/jena/rdfxml/xmloutput/impl/Unparser.java     | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/7f6de894/jena-core/src/main/java/com/hp/hpl/jena/rdfxml/xmloutput/impl/Unparser.java
----------------------------------------------------------------------
diff --git a/jena-core/src/main/java/com/hp/hpl/jena/rdfxml/xmloutput/impl/Unparser.java b/jena-core/src/main/java/com/hp/hpl/jena/rdfxml/xmloutput/impl/Unparser.java
index c523c70..c9a7127 100644
--- a/jena-core/src/main/java/com/hp/hpl/jena/rdfxml/xmloutput/impl/Unparser.java
+++ b/jena-core/src/main/java/com/hp/hpl/jena/rdfxml/xmloutput/impl/Unparser.java
@@ -1038,7 +1038,7 @@ class Unparser {
     private void wPropAttrString(Property p, Literal l) {
         print(" ");
         wQNameAttr(p);
-        print("=" + quote(l.getString()));
+        print("=" + quote(l.getLexicalForm())) ;
     }
 
     /*
@@ -1337,6 +1337,8 @@ class Unparser {
 
         if (s.getObject() instanceof Literal) {
             Literal l = s.getLiteral();
+            if ( ! Util.isSimpleString(l) )
+            
             if (l.getDatatypeURI() != null)
                 return false;
 


Mime
View raw message