W3C home > Mailing lists > Public > public-multilingualweb-lt-commits@w3.org > October 2012

its20 CVS commit

From: Felix Sasaki via cvs-syncmail <cvsmail@w3.org>
Date: Tue, 02 Oct 2012 07:29:31 +0000
To: public-multilingualweb-lt-commits@w3.org
Message-Id: <E1TIwv5-0006t2-SC@lionel-hutz.w3.org>
Update of /w3ccvs/WWW/International/multilingualweb/lt/drafts/its20/examples/html5
In directory hutz:/tmp/cvs-serv26214/examples/html5

Modified Files:
	EX-locQualityIssue-html5-local-2.html qaissues.js 
Log Message:
action-233 quality issue example updated

Index: qaissues.js
===================================================================
RCS file: /w3ccvs/WWW/International/multilingualweb/lt/drafts/its20/examples/html5/qaissues.js,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- qaissues.js	23 Aug 2012 15:39:45 -0000	1.2
+++ qaissues.js	2 Oct 2012 07:29:29 -0000	1.3
@@ -14,11 +14,20 @@
     }
 }
 function getqaissue (qiref) {
-    var qielem = document.getElementById(qiref.substr(1));
-    var issues = qielem.childNodes;
     var issueslist = new String;
-    for(i=0; i<issues.length; i++) {
-	if(issues[i].nodeType==1) { issueslist = issueslist +
-				    issues[i].getAttribute('its-loc-quality-issue-type') + " "; } }
+    var parser = new DOMParser();
+    var standoffits = document.getElementById('its-standoff-1').textContent;
+    var doc = parser.parseFromString(standoffits,'application/xml');
+    var locqualityissues = doc.getElementsByTagNameNS('http://www.w3.org/2005/11/its','locQualityIssues');
+    for(i=0; i<locqualityissues.length; i++)
+    {
+	if (locqualityissues[i].getAttribute('xml:id') == qiref.substr(1));
+	{	
+	    var issues = locqualityissues[i].childNodes;}
+	var issueslist = new String;
+        for(i=0; i<issues.length; i++) {
+	    if(issues[i].nodeType==1) { issueslist = issueslist +
+					issues[i].getAttribute('locQualityIssueType') + " "; } }
+    }
     window.alert("QA issues found. Type(s) of issues: " + issueslist);
 }
\ No newline at end of file

Index: EX-locQualityIssue-html5-local-2.html
===================================================================
RCS file: /w3ccvs/WWW/International/multilingualweb/lt/drafts/its20/examples/html5/EX-locQualityIssue-html5-local-2.html,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- EX-locQualityIssue-html5-local-2.html	20 Sep 2012 09:12:24 -0000	1.5
+++ EX-locQualityIssue-html5-local-2.html	2 Oct 2012 07:29:29 -0000	1.6
@@ -4,22 +4,22 @@
         <meta charset=utf-8>
             <title>Test</title>
             <script src=qaissues.js type=text/javascript></script>
+<script type=application/xml id=its-standoff-1>
+  <its:locQualityIssues xml:id="lq1" xmlns:its="http://www.w3.org/2005/11/its">
+   <its:locQualityIssue
+    locQualityIssueType="misspelling"
+    locQualityIssueComment="'c'es' is unknown. Could be 'c'est'"
+    locQualityIssueSeverity="50"/>
+   <its:locQualityIssue
+    locQualityIssueType="typographical"
+    locQualityIssueComment="Sentence without capitalization"
+    locQualityIssueSeverity="30"/>
+  </its:locQualityIssues>
+</script>
             <style type=text/css>.qaissue { background-color: yellow; } </style>
     </head>
     <body onload=addqaissueattrs()>
         <p>
             <span its-loc-quality-issues-ref=#lq1>c'es</span> le contenu</p>
-                <span id=lq1 its-loc-quality-issues=its-loc-quality-issues>
-                    <span
-                        its-loc-quality-issue=its-loc-quality-issue
-                        its-loc-quality-issue-coment="Sentence without capitalization"
-                        its-loc-quality-issue-severity=30
-                        its-loc-quality-issue-type=typographical></span>
-                    <span
-                        its-loc-quality-issue=its-loc-quality-issue
-                        its-loc-quality-issue-coment="'c'es' is unknown. Could be 'c'est'"
-                        its-loc-quality-issue-severity=50
-                        its-loc-quality-issue-type=misspelling></span>
-                </span>
     </body>
 </html>
\ No newline at end of file
Received on Tuesday, 2 October 2012 07:29:33 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:32:38 UTC