From: <bru...@us...> - 2012-04-06 14:18:50
|
Revision: 10764 http://x3d.svn.sourceforge.net/x3d/?rev=10764&view=rev Author: brutzman Date: 2012-04-06 14:18:41 +0000 (Fri, 06 Apr 2012) Log Message: ----------- appearance and links Modified Paths: -------------- www.web3d.org/x3d/tools/X3dQualityAssurance/X3dValidator/src/java/edu/nps/moves/x3d/Index.java www.web3d.org/x3d/tools/X3dQualityAssurance/X3dValidator/src/java/edu/nps/moves/x3d/Validator.java www.web3d.org/x3d/tools/X3dQualityAssurance/X3dValidator/web/xindex.html Added Paths: ----------- www.web3d.org/x3d/tools/X3dQualityAssurance/X3dValidator/web/images/ www.web3d.org/x3d/tools/X3dQualityAssurance/X3dValidator/web/images/X3DtextIcon16.png www.web3d.org/x3d/tools/X3dQualityAssurance/X3dValidator/web/images/web3d_logo2.png www.web3d.org/x3d/tools/X3dQualityAssurance/X3dValidator/web/images/x3d2-s.gif Modified: www.web3d.org/x3d/tools/X3dQualityAssurance/X3dValidator/src/java/edu/nps/moves/x3d/Index.java =================================================================== --- www.web3d.org/x3d/tools/X3dQualityAssurance/X3dValidator/src/java/edu/nps/moves/x3d/Index.java 2012-04-06 13:44:23 UTC (rev 10763) +++ www.web3d.org/x3d/tools/X3dQualityAssurance/X3dValidator/src/java/edu/nps/moves/x3d/Index.java 2012-04-06 14:18:41 UTC (rev 10764) @@ -133,6 +133,9 @@ } else { tempF = new File(tempDir, fsName); + // TODO what is local path on client machine? +// String filePath = clientPath + "/" + fsName; +// sb.append("URL: ");sb.append("<a href='file:/").append(filePath).append("'>").append(filePath).append("</a>").append("\n"); doValidate(sb, fsName, tempF); } } @@ -154,7 +157,8 @@ HttpEntity entity = hresp.getEntity(); if (entity != null) { tempF2 = copyFile(entity.getContent(), simpleName); - sb.append("URL: ");sb.append(myurl);sb.append("\n"); +// sb.append("URL: "); + sb.append("<a href='").append(myurl).append("'>").append(myurl).append("</a>").append("\n\n"); doValidate(sb, simpleName, tempF2); } else { @@ -192,14 +196,15 @@ private void doValidate(StringBuilder sb, String simpleName, File f) throws Exception { - sb.append("File: "); +// sb.append("File: "); + sb.append("<b>"); sb.append(simpleName); - sb.append(" / "); + sb.append("</b> "); - sb.append("length: "); + sb.append("(length: "); sb.append(f.length()); - sb.append("\n"); - sb.append(Validator.validate(f)); + sb.append(" bytes)\n"); + sb.append(Validator.validate(f)); } private File copyFile(InputStream inStr, String filename) throws IOException Modified: www.web3d.org/x3d/tools/X3dQualityAssurance/X3dValidator/src/java/edu/nps/moves/x3d/Validator.java =================================================================== --- www.web3d.org/x3d/tools/X3dQualityAssurance/X3dValidator/src/java/edu/nps/moves/x3d/Validator.java 2012-04-06 13:44:23 UTC (rev 10763) +++ www.web3d.org/x3d/tools/X3dQualityAssurance/X3dValidator/src/java/edu/nps/moves/x3d/Validator.java 2012-04-06 14:18:41 UTC (rev 10764) @@ -80,8 +80,22 @@ } private static void appendStart(StringBuilder sb, String passName) { - sb.append("\n<b>Beginning "); - sb.append(passName); + appendStart (sb, passName, ""); + } + private static void appendStart(StringBuilder sb, String passName, String referenceUrl) + { + sb.append("\n<b>Performing "); + if (referenceUrl.isEmpty()) + { + sb.append(passName); + } + else + { + sb.append("<a href='").append(referenceUrl).append("' target='X3dValidatorReference'>"); + sb.append(passName.substring(0,passName.indexOf(" check"))); // first part + sb.append("</a>"); + sb.append(passName.substring(passName.indexOf(" check"))); // last part + } sb.append("...</b>\n"); } @@ -94,16 +108,21 @@ try { String passName; + String referenceUrlDoctype = "http://www.web3d.org/x3d/content/examples/X3dSceneAuthoringHints.html#Validation"; + String referenceUrlWellFormed = "http://en.wikipedia.org/wiki/XML#Well-formedness_and_error-handling"; + String referenceUrlDtdSchema = "http://www.web3d.org/specifications"; + String referenceUrlDtdSchematron = "http://www.web3d.org/x3d/tools/schematron/X3dSchematron.html"; + // TODO X3dToClassicVrml, regex /* DOCTYPE */ - appendStart(sb, passName="DOCTYPE check"); + appendStart(sb, passName="DOCTYPE check", referenceUrlDoctype); String validationLog = new X3dDoctypeCheckerModified().processScene(f.getAbsolutePath()); sb.append(escapeHtml(validationLog)); sb.append("\n"); appendResults(sb,passName,validationLog.contains(X3dDoctypeChecker.errorToken) || validationLog.contains(X3dDoctypeChecker.warningToken)); /* Well formed */ - appendStart(sb, passName="XML well-formed check"); + appendStart(sb, passName="XML well-formed check", referenceUrlWellFormed); SAXParserFactory factory = SAXParserFactory.newInstance(); factory.setValidating(false); // Turn off validation factory.setSchema(null); @@ -113,8 +132,8 @@ parser.parse(f, hand); appendResults(sb,passName,hand.error); - /* DTD validation */ - appendStart(sb,passName="DTD validation"); + /* X3D DTD validation */ + appendStart(sb,passName="X3D DTD validation check", referenceUrlDtdSchema); factory.setValidating(true); factory.setSchema(null); parser = factory.newSAXParser(); @@ -123,7 +142,7 @@ appendResults(sb,passName,hand.error); /* Schema validation */ - appendStart(sb,passName="schema validation"); + appendStart(sb,passName="X3D schema validation check", referenceUrlDtdSchema); factory.setValidating(true); factory.setNamespaceAware(true); parser = factory.newSAXParser(); @@ -163,7 +182,7 @@ classicVrmlOutput.delete(); /* schematron */ - appendStart(sb,passName="X3D Schematron check"); + appendStart(sb,passName="X3D Schematron check", referenceUrlDtdSchematron); xmlSource = new StreamSource(new FileInputStream(f)); xslSource = new StreamSource(Validator.class.getResourceAsStream("/stylesheets/X3dSchematronValidityChecks.xslt")); File schematronOutput = File.createTempFile(f.getName() + "_", "_schematronOutput_1.txt"); @@ -195,7 +214,7 @@ schematronOutput.delete(); /* regex */ - appendStart(sb,passName="Integer/float regular expression checker"); + appendStart(sb,passName="Integer/float regular expression (regex) checker"); Log4JListener.sb = sb; int numMessages = Log4JListener.numMessages; Added: www.web3d.org/x3d/tools/X3dQualityAssurance/X3dValidator/web/images/X3DtextIcon16.png =================================================================== (Binary files differ) Property changes on: www.web3d.org/x3d/tools/X3dQualityAssurance/X3dValidator/web/images/X3DtextIcon16.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: www.web3d.org/x3d/tools/X3dQualityAssurance/X3dValidator/web/images/web3d_logo2.png =================================================================== (Binary files differ) Property changes on: www.web3d.org/x3d/tools/X3dQualityAssurance/X3dValidator/web/images/web3d_logo2.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: www.web3d.org/x3d/tools/X3dQualityAssurance/X3dValidator/web/images/x3d2-s.gif =================================================================== (Binary files differ) Property changes on: www.web3d.org/x3d/tools/X3dQualityAssurance/X3dValidator/web/images/x3d2-s.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Modified: www.web3d.org/x3d/tools/X3dQualityAssurance/X3dValidator/web/xindex.html =================================================================== --- www.web3d.org/x3d/tools/X3dQualityAssurance/X3dValidator/web/xindex.html 2012-04-06 13:44:23 UTC (rev 10763) +++ www.web3d.org/x3d/tools/X3dQualityAssurance/X3dValidator/web/xindex.html 2012-04-06 14:18:41 UTC (rev 10764) @@ -1,10 +1,15 @@ <!DOCTYPE html> <html> <head> + <link rel="icon" href="images/X3DtextIcon16.png" title="X3D" type="image/png"/> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>X3D Validator</title> - <meta name="generator" content="Netbeans"/> + <meta name="creator" content="Mike Bailey, Don McGregor and Don Brutzman"/> + <meta name="created" content="28 Maarch 2012"/> + <meta name="generator" content="Netbeans 7.1"/> <meta name="reference" content="https://savage.nps.edu/X3dValidator"/> + <meta name="reference" content="http://www.web3d.org/x3d/content/examples/X3dResources.html"/> + <meta name="reference" content="http://www.web3d.org/x3d/content/examples/X3dSceneAuthoringHints.html"/> <script type="text/javascript" src="http://code.jquery.com/jquery-1.7.2.min.js"></script> <script type="text/javascript"> @@ -13,27 +18,27 @@ { var fileTF = $("#fileRadio").attr("checked"); if(fileTF) { - $("#browseButt").removeAttr("disabled"); + $("#browseButton").removeAttr("disabled"); $("#webUrlTextField").attr('disabled','disabled'); checkFileNonNull(); } else { $("#webUrlTextField").removeAttr("disabled"); - $("#browseButt").attr('disabled','disabled'); + $("#browseButton").attr('disabled','disabled'); checkWebNonNull(); } }); - $("#browseButt").click(function() + $("#browseButton").click(function() { - $("#submitButt").removeAttr("disabled"); + $("#submitButton").removeAttr("disabled"); return true; }); $("#myform").submit(function() { - $("#submitButt").attr('disabled', 'disabled'); - $("#resultsDiv").html('<center>Working.......</center>'); + $("#submitButton").attr('disabled', 'disabled'); + $("#resultsDiv").html('<center>Working ...</center>'); return true; }); @@ -46,45 +51,74 @@ function checkWebNonNull() { if($('#webUrlTextField').val().length > 0) - $("#submitButt").removeAttr("disabled"); - else - $("#submitButt").attr('disabled', 'disabled'); + { + $("#webRadio").attr("checked"); + $("#submitButton").removeAttr("disabled"); + } + else if($("#browseButton").val().length > 0) + $("#submitButton").attr('disabled', 'disabled'); } function checkFileNonNull() { - if($("#browseButt").val().length > 0) - $("#submitButt").removeAttr("disabled"); - else - $("#submitButt").attr('disabled', 'disabled'); + if($("#browseButton").val().length > 0) + { + $("#fileRadio").attr("checked"); + $("#submitButton").removeAttr("disabled"); + } + else if($('#webUrlTextField').val().length > 0) + $("#submitButton").attr('disabled', 'disabled'); } </script> </head> <body> - <center> - <h1>X3D Validator</h1> - <p>This site allows checking of X3D scene graphs.</p> - <form id="myform" action="<--APP_CONTEXT-->/process" method="post" enctype="multipart/form-data"> + + <table border="0" cellspacing="0" cellpadding="0" summary="" align="center"> + <tr align="center"> + <td><a href="http://www.web3d.org/x3d/content/examples/X3dResources.html"><img src="images/x3d2-s.gif" width="154" height="97" border="0" title="to X3D Resources page"></a></td> <!-- alt="to X3D home page" --> + <td><pre> </pre></td> + <td><h1>X3D Validator</h1><p align='center'>This site checks X3D scene validity.</p></td> + <td><pre> </pre></td> + <td><a href="http://www.web3d.org"><img src="images/web3d_logo2.png" width="120" height="60" border="0" title="to Web3D home page"></a></td> <!-- alt="to X3D home page" --> + </tr> + </table> + + <center> + <form id="myform" action="<--APP_CONTEXT-->" method="post" enctype="multipart/form-data"> <table border="1" rules="none"> - <tr><td><input id="fileRadio" type="radio" name="method" value="file" checked="checked"/> Choose an X3D file from your local computer:</td></tr> - <tr><td><input id="browseButt" type="file" name="filename" size="60"/></td></tr> - <tr><td> </td></tr> - <tr><td><input id="webRadio" type="radio" name="method" value="web"/> Enter a web url:</td></tr> - <tr><td><input id="webUrlTextField" type="text" name="url" size="75" disabled="disabled"/></td></tr> + <tr><td align="left"><input id="fileRadio" type="radio" name="method" value="file" checked="checked"/> Choose a local .x3d file:</td></tr> + <tr><td align="full"><input id="browseButton" type="file" name="filename" size="100"/></td></tr> + <tr><td align="left"> </td></tr> + <tr><td align="left"><input id="webRadio" type="radio" name="method" value="web"/> Enter an online .x3d url:</td></tr> + <tr><td align="left"><input id="webUrlTextField" type="text" name="url" size="100" disabled="disabled"/></td></tr> </table> <br /> <table> + <!-- <tr><td>Upload the file and begin analysis:<br/></td></tr> - <tr><td align="center"><input id="submitButt" disabled="disabled" type="submit" value="Upload and Begin"/></td></tr> + --> + <tr><td align="center"><input id="submitButton" disabled="disabled" type="submit" value="Upload and Analyze"/></td></tr> </table> </form> </center> <br/> - <div id="resultsDiv" style="background-color:#eeeeee;margin-left:100px;margin-right:100px;border:1px solid grey;white-space:pre-line;"><pre><!--DELIMITER--></pre></div> + + <div id="resultsDiv" style="background-color:#eeeeee;margin-left:100px;margin-right:100px;border:1px solid grey;white-space:pre-line;"><p><!--DELIMITER--></p></div> + <p align='center'> - Updated 5 April 2012, available at + Updated 5 April 2012, this + <a href="https://savage.nps.edu/X3dValidator">X3D Validator</a> + is available online at <a href="https://savage.nps.edu/X3dValidator">https://savage.nps.edu/X3dValidator</a> </p> + + <p align="center"> + <a href="http://www.nps.navy.mil/disclaimer" target="disclaimer">Official disclaimer</a>: +"Material contained herein is made available for the purpose of +peer review and discussion and does not necessarily reflect the +views of the Department of the Navy or the Department of Defense." + </p> + </body> </html> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bru...@us...> - 2012-04-10 19:58:39
|
Revision: 10799 http://x3d.svn.sourceforge.net/x3d/?rev=10799&view=rev Author: brutzman Date: 2012-04-10 19:58:32 +0000 (Tue, 10 Apr 2012) Log Message: ----------- README regarding downloads, link for regex Modified Paths: -------------- www.web3d.org/x3d/tools/X3dQualityAssurance/X3dValidator/src/java/edu/nps/moves/x3d/Validator.java www.web3d.org/x3d/tools/X3dQualityAssurance/X3dValidator/web/xindex.html Added Paths: ----------- www.web3d.org/x3d/tools/X3dQualityAssurance/X3dValidator/src/java/org/web3d/x3d/tools/README.developers.txt Modified: www.web3d.org/x3d/tools/X3dQualityAssurance/X3dValidator/src/java/edu/nps/moves/x3d/Validator.java =================================================================== --- www.web3d.org/x3d/tools/X3dQualityAssurance/X3dValidator/src/java/edu/nps/moves/x3d/Validator.java 2012-04-10 03:21:12 UTC (rev 10798) +++ www.web3d.org/x3d/tools/X3dQualityAssurance/X3dValidator/src/java/edu/nps/moves/x3d/Validator.java 2012-04-10 19:58:32 UTC (rev 10799) @@ -63,14 +63,14 @@ public class Validator { - private static String greenPass = "<font color='green'>pass</font>\n"; + private static String greenPass = "<font color='green'>pass</font>.\n"; private static void appendResults(String passName, boolean error) { if (error) { outputLog.append("<font color='red'>Error(s) detected during this validation test.\n"); outputLog.append(passName); - outputLog.append(": fail</font>\n"); + outputLog.append(": fail.</font>\n"); } else { outputLog.append(passName); @@ -131,11 +131,14 @@ ThisTransformListener thisTransformListener; String passName = new String(); + + // reference urls also maintained at http://www.web3d.org/x3d/content/examples/X3dResources.html#QualityAssurance String referenceUrlDoctype = "http://www.web3d.org/x3d/content/examples/X3dSceneAuthoringHints.html#Validation"; String referenceUrlWellFormed = "http://en.wikipedia.org/wiki/XML#Well-formedness_and_error-handling"; String referenceUrlDtdSchema = "http://www.web3d.org/specifications"; String referenceUrlDtdSchematron = "http://www.web3d.org/x3d/tools/schematron/X3dSchematron.html"; String referenceUrlX3dToClassicVrml = "http://www.web3d.org/x3d/stylesheets/X3dToVrml97.xslt"; + String referenceUrlRegex = "http://www.web3d.org/pipermail/x3d-public_web3d.org/2012-March/001950.html"; outputLog.append("\n--------- Commence validation checks for <b>"); outputLog.append(f.getName()); @@ -275,7 +278,7 @@ } try { /* regex */ - appendStart(passName="Integer/float regular expression (regex) check"); + appendStart(passName="integer/float regular expression (regex) check",referenceUrlRegex); Log4JListener.sb = outputLog; int numMessages = Log4JListener.numMessages; Added: www.web3d.org/x3d/tools/X3dQualityAssurance/X3dValidator/src/java/org/web3d/x3d/tools/README.developers.txt =================================================================== --- www.web3d.org/x3d/tools/X3dQualityAssurance/X3dValidator/src/java/org/web3d/x3d/tools/README.developers.txt (rev 0) +++ www.web3d.org/x3d/tools/X3dQualityAssurance/X3dValidator/src/java/org/web3d/x3d/tools/README.developers.txt 2012-04-10 19:58:32 UTC (rev 10799) @@ -0,0 +1,4 @@ +These source files originate from masters in directory +C:\www.web3d.org\x3d\tools\ + +and are copied here by 'build all' to allow careful migration of changes. \ No newline at end of file Modified: www.web3d.org/x3d/tools/X3dQualityAssurance/X3dValidator/web/xindex.html =================================================================== --- www.web3d.org/x3d/tools/X3dQualityAssurance/X3dValidator/web/xindex.html 2012-04-10 03:21:12 UTC (rev 10798) +++ www.web3d.org/x3d/tools/X3dQualityAssurance/X3dValidator/web/xindex.html 2012-04-10 19:58:32 UTC (rev 10799) @@ -106,8 +106,26 @@ <div id="resultsDiv" style="background-color:#eeeeee;margin-left:100px;margin-right:100px;border:1px solid grey;white-space:pre-line;"><p><!--DELIMITER--></p></div> - <h2><a name="Contact">Contact</a></h2> + <h3><a name="Status">Status</a></h3> + + <ul> + <li> + Security note: currently no scenes or errors are saved by the server. + Future versions may support submitting error reports of general interest. + </li> + <li> + This codebase is open source and undergoing continued development. + </li> + <li> + Further information can be found under + <a href="http://www.web3d.org/x3d/content/examples/X3dResources.html#QualityAssurance">Quality Assurance</a> + section of the + <a href="http://www.web3d.org/x3d/content/examples/X3dResources.html">X3D Resources</a> + </li> + </ul> + <h3><a name="Contact">Contact</a></h3> + <blockquote> Questions, suggestions and comments about these resources are welcome. Please send them to @@ -123,7 +141,7 @@ </blockquote> <blockquote> - Updated 9 April 2012 + Updated 10 April 2012 </blockquote> <blockquote> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bru...@us...> - 2012-04-12 01:59:09
|
Revision: 10807 http://x3d.svn.sourceforge.net/x3d/?rev=10807&view=rev Author: brutzman Date: 2012-04-12 01:59:01 +0000 (Thu, 12 Apr 2012) Log Message: ----------- NPS Savage open-source BSD-style license Added Paths: ----------- www.web3d.org/x3d/tools/X3dQualityAssurance/X3dValidator/license.html www.web3d.org/x3d/tools/X3dQualityAssurance/X3dValidator/license.txt Added: www.web3d.org/x3d/tools/X3dQualityAssurance/X3dValidator/license.html =================================================================== --- www.web3d.org/x3d/tools/X3dQualityAssurance/X3dValidator/license.html (rev 0) +++ www.web3d.org/x3d/tools/X3dQualityAssurance/X3dValidator/license.html 2012-04-12 01:59:01 UTC (rev 10807) @@ -0,0 +1,62 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html> + <head> + <title>Open-Source Software License for NPS MOVES Savage Research Group</title> + <meta name="description" content="Open-Source Software License for NPS MOVES Savage Research Group. + This BSD-style license is non-viral and friendly to acaemia, government, industry, and individuals." /> + <meta name="author" content="Donald P. Brutzman" /> + <meta name="created" content="4 March 2005" /> + <meta name="revised" content="1 January 2012" /> + <meta name="identifier" content="https://savage.nps.edu/Savage/license.html" /> + <meta name="identifier" content="https://savage.nps.edu/Savage/license.txt" /> + <meta name="identifier" content="http://handle.dtic.mil/100.2/ADA450769" /> + <meta name="reference" content="http://www.oreilly.com/catalog/osfreesoft" /> + <meta name="reference" content="http://opensource.org/licenses/bsd-license.php" /> + <meta name="reference" content="http://xchat.movesinstitute.org/bugzilla/show_bug.cgi?id=32" /> + <link rel="icon" href="http://www.web3D.org/x3d/content/examples/images/X3DtextIcon16.png" title="X3D" type="image/png"/> + </head> + <body> + <p>Copyright (c) 1995-2012 held by the author(s). All rights reserved.</p> + + <p> + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + </p> + + <ul> + <li> + Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + </li> + <li> + Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer + in the documentation and/or other materials provided with the + distribution. + </li> + <li> + Neither the names of the + <a href="http://www.nps.edu">Naval Postgraduate School (NPS)</a> + <a href="http://www.MovesInstitute.org">Modeling Virtual Environments and Simulation (MOVES) Institute</a> + nor the names of its contributors may be used to endorse or + promote products derived from this software without specific + prior written permission. + </li> + </ul> + + <p>THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE.</p> + + </body> +</html> Added: www.web3d.org/x3d/tools/X3dQualityAssurance/X3dValidator/license.txt =================================================================== --- www.web3d.org/x3d/tools/X3dQualityAssurance/X3dValidator/license.txt (rev 0) +++ www.web3d.org/x3d/tools/X3dQualityAssurance/X3dValidator/license.txt 2012-04-12 01:59:01 UTC (rev 10807) @@ -0,0 +1,31 @@ +Copyright (c) 1995-2012 held by the author(s). All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer + in the documentation and/or other materials provided with the + distribution. + * Neither the names of the Naval Postgraduate School (NPS) + Modeling Virtual Environments and Simulation (MOVES) Institute + (http://www.nps.edu and http://www.MovesInstitute.org) + nor the names of its contributors may be used to endorse or + promote products derived from this software without specific + prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bru...@us...> - 2012-04-12 03:40:26
|
Revision: 10812 http://x3d.svn.sourceforge.net/x3d/?rev=10812&view=rev Author: brutzman Date: 2012-04-12 03:40:19 +0000 (Thu, 12 Apr 2012) Log Message: ----------- add X3dToXhtml.xslt pretty-print capability as diagnostic output Modified Paths: -------------- www.web3d.org/x3d/tools/X3dQualityAssurance/X3dValidator/src/java/edu/nps/moves/x3d/Validator.java www.web3d.org/x3d/tools/X3dQualityAssurance/X3dValidator/web/xindex.html Modified: www.web3d.org/x3d/tools/X3dQualityAssurance/X3dValidator/src/java/edu/nps/moves/x3d/Validator.java =================================================================== --- www.web3d.org/x3d/tools/X3dQualityAssurance/X3dValidator/src/java/edu/nps/moves/x3d/Validator.java 2012-04-12 03:39:28 UTC (rev 10811) +++ www.web3d.org/x3d/tools/X3dQualityAssurance/X3dValidator/src/java/edu/nps/moves/x3d/Validator.java 2012-04-12 03:40:19 UTC (rev 10812) @@ -115,7 +115,7 @@ appendResults(passName,true); } - private static final StringBuilder outputLog = new StringBuilder(); + private static StringBuilder outputLog; public static String validate(File f) { @@ -130,6 +130,7 @@ Transformer saxonTransformer; ThisTransformListener thisTransformListener; + outputLog = new StringBuilder(); // clear prior results String passName = new String(); // reference urls also maintained at http://www.web3d.org/x3d/content/examples/X3dResources.html#QualityAssurance @@ -139,7 +140,10 @@ String referenceUrlDtdSchematron = "http://www.web3d.org/x3d/tools/schematron/X3dSchematron.html"; String referenceUrlX3dToClassicVrml = "http://www.web3d.org/x3d/stylesheets/X3dToVrml97.xslt"; String referenceUrlRegex = "http://www.web3d.org/pipermail/x3d-public_web3d.org/2012-March/001950.html"; + String referenceUrlPrettyPrintHtml = "http://www.web3d.org/x3d/stylesheets/X3dToXhtml.xslt"; + final String xsdBaseInClassPath = "/stylesheets/"; + outputLog.append("\n--------- Commence validation checks for <b>"); outputLog.append(f.getName()); outputLog.append("</b> ---------\n"); @@ -206,7 +210,6 @@ } try { /* X3d to classic vrml */ - final String xsdBaseInClassPath = "/stylesheets/"; appendStart(passName="X3dToClassicVrml.xslt conversion check", referenceUrlX3dToClassicVrml); xmlStreamSource = new StreamSource(new FileInputStream(f)); @@ -259,16 +262,16 @@ xslStreamSource = new StreamSource(Validator.class.getResourceAsStream("/stylesheets/SvrlReportText.xslt")); xmlStreamSource = new StreamSource(new FileInputStream(schematronOutput));// Use output from last - StringWriter resultSW = new StringWriter(); - streamResult = new StreamResult(resultSW); + StringWriter resultStringWriter = new StringWriter(); + streamResult = new StreamResult(resultStringWriter); saxonTransformer = saxonTransformerFactory.newTransformer(xslStreamSource); saxonTransformer.setErrorListener(new ThisTransformListener(outputLog)); int len = outputLog.length(); saxonTransformer.transform(xmlStreamSource, streamResult); - String resultStr = resultSW.toString(); - outputLog.append(escapeHtml(resultStr)); - boolean error = resultStr.length()>0;// any output is error + String resultString = resultStringWriter.toString(); + outputLog.append(escapeHtml(resultString)); + boolean error = resultString.length()>0;// any output is error appendResults(passName,error); schematronOutput.delete(); } @@ -296,10 +299,54 @@ outputLog.append(t.getLocalizedMessage()); outputLog.append("\n"); } + try { + /* X3dToXhtml.xslt */ + appendStart(passName="X3D to XHTML pretty-print listing check", referenceUrlPrettyPrintHtml); + xmlStreamSource = new StreamSource(new FileInputStream(f)); + xslStreamSource = new StreamSource(Validator.class.getResourceAsStream("/stylesheets/X3dToXhtml.xslt")); + File x3dToXhtmlOutput = File.createTempFile(f.getName() + "_", "_X3dToXhtmlOutput.txt"); + x3dToXhtmlOutput.deleteOnExit(); + streamResult = new StreamResult(x3dToXhtmlOutput); + + saxonConfiguration = new net.sf.saxon.Configuration(); + saxonConfiguration.setURIResolver(new URIResolver() + { + @Override + public Source resolve(String href, String base) throws TransformerException + { + if (href.equals("X3dToXhtml.xslt") || href.equals("X3dExtrusionToSvgViaXslt1.1.xslt")) + return new StreamSource(Validator.class.getResourceAsStream(xsdBaseInClassPath+href)); + System.out.println("href = "+href + " base = "+base); + return null; + } + }); + + StringWriter resultStringWriter = new StringWriter(); + streamResult = new StreamResult(resultStringWriter); + saxonTransformerFactory = new net.sf.saxon.TransformerFactoryImpl(saxonConfiguration); + saxonTransformer = saxonTransformerFactory.newTransformer(xslStreamSource); + thisTransformListener = new ThisTransformListener(outputLog); + saxonTransformer.setErrorListener(thisTransformListener); + saxonTransformer.transform(xmlStreamSource, streamResult); + + String resultString = resultStringWriter.toString(); + resultString = resultString.substring(resultString.indexOf("<body>")+6, resultString.indexOf("</body>")); // trim to excerpt desired results + + outputLog.append("<div>Authoring hint: the following pretty-print listing can be used to check online URL links and to document ROUTE connections.</div>"); + outputLog.append("<div style='background-color:#ffffff;white-space:normal;'><hr />"); + outputLog.append(resultString).append("\n"); // no need to escapeHtml() + outputLog.append("<br />\n").append("<hr />\n").append("</div>"); + appendResults(passName,thisTransformListener.error); + x3dToXhtmlOutput.delete(); + } + catch (Throwable t) + { + catchResponse (t, passName); + } outputLog.append("\n--------- Validation checks complete for <b>"); outputLog.append(f.getName()); - outputLog.append("</b> ---------\n"); + outputLog.append("</b> ---------"); return outputLog.toString(); } Modified: www.web3d.org/x3d/tools/X3dQualityAssurance/X3dValidator/web/xindex.html =================================================================== --- www.web3d.org/x3d/tools/X3dQualityAssurance/X3dValidator/web/xindex.html 2012-04-12 03:39:28 UTC (rev 10811) +++ www.web3d.org/x3d/tools/X3dQualityAssurance/X3dValidator/web/xindex.html 2012-04-12 03:40:19 UTC (rev 10812) @@ -73,6 +73,25 @@ } </script> + <!-- Style information from X3dToXhtml.xslt --> + <style type="text/css"> +span.element {color: navy} +span.attribute {color: green} +span.value {color: teal} +span.plain {color: black} +span.gray {color: gray} +span.idName {color: maroon} +a.idName {color: maroon} +div.center {text-align: center} +div.indent {margin-left: 25px} + +span.prototype {color: purple} +a.prototype {color: purple} +a.prototype:visited {color: black} +span.route {color: red} +b.warning {color: #CC5500} +b.error {color: #CC0000} + </style> </head> <body> @@ -106,9 +125,12 @@ </center> <br/> + <!-- ================================================================================== --> + <div id="resultsDiv" style="background-color:#eeeeee;margin-left:100px;margin-right:100px;border:1px solid grey;white-space:pre-line;"><p><!--DELIMITER--></p></div> - <h3><a name="Status">Status</a></h3> + <!-- ================================================================================== --> + <h3><a name="Status">X3D Validator Status</a></h3> <ul> <li> @@ -116,42 +138,47 @@ Future versions may support submitting error reports of general interest. </li> <li> - This codebase is open source and undergoing continued development. + This codebase is + <a href="http://x3d.svn.sourceforge.net/viewvc/x3d/www.web3d.org/x3d/tools/X3dQualityAssurance/X3dValidator">open source</a> + and undergoing continued development. </li> <li> - Further information can be found under + The <a href="http://www.web3d.org/x3d/content/examples/X3dResources.html#QualityAssurance">Quality Assurance</a> section of the <a href="http://www.web3d.org/x3d/content/examples/X3dResources.html">X3D Resources</a> + page provides further information about these tests. </li> </ul> <h3><a name="Contact">Contact</a></h3> - <blockquote> + <ul> + <li> Questions, suggestions and comments about these resources are welcome. Please send them to <a href="http://faculty.nps.edu/brutzman" target="_blank">Don Brutzman</a> (<a href="mailto:brutzman%20at%20nps.edu%20(Don%20Brutzman)?subject=feedback:%20X3D%20Validator%20"><i>brutzman at nps.edu</i></a>) - </blockquote> + </li> - <blockquote> + <li> The <a href="https://savage.nps.edu/X3dValidator">X3D Validator</a> is available online at <a href="https://savage.nps.edu/X3dValidator">https://savage.nps.edu/X3dValidator</a> - </blockquote> + </li> - <blockquote> - Updated 10 April 2012 - </blockquote> + <li> + Updated 11 April 2012 + </li> + </ul> - <blockquote> + <p> <a href="http://www.nps.navy.mil/disclaimer" target="disclaimer">Official disclaimer</a>: "Material contained herein is made available for the purpose of peer review and discussion and does not necessarily reflect the views of the Department of the Navy or the Department of Defense." - </blockquote> + </p> </body> </html> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bru...@us...> - 2012-04-21 20:37:03
|
Revision: 10846 http://x3d.svn.sourceforge.net/x3d/?rev=10846&view=rev Author: brutzman Date: 2012-04-21 20:36:52 +0000 (Sat, 21 Apr 2012) Log Message: ----------- ignore on commit Modified Paths: -------------- www.web3d.org/x3d/tools/X3dQualityAssurance/X3dValidator/nbproject/genfiles.properties www.web3d.org/x3d/tools/X3dQualityAssurance/X3dValidator/src/java/stylesheets/X3dToXhtml.xslt Modified: www.web3d.org/x3d/tools/X3dQualityAssurance/X3dValidator/nbproject/genfiles.properties =================================================================== --- www.web3d.org/x3d/tools/X3dQualityAssurance/X3dValidator/nbproject/genfiles.properties 2012-04-21 20:36:09 UTC (rev 10845) +++ www.web3d.org/x3d/tools/X3dQualityAssurance/X3dValidator/nbproject/genfiles.properties 2012-04-21 20:36:52 UTC (rev 10846) @@ -3,6 +3,6 @@ build.xml.stylesheet.CRC32=651128d4@1.36.1.1 # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. -nbproject/build-impl.xml.data.CRC32=2baa223d +nbproject/build-impl.xml.data.CRC32=86443ba5 nbproject/build-impl.xml.script.CRC32=c2aadc18 nbproject/build-impl.xml.stylesheet.CRC32=b7883b1f@1.36.1.1 Modified: www.web3d.org/x3d/tools/X3dQualityAssurance/X3dValidator/src/java/stylesheets/X3dToXhtml.xslt =================================================================== --- www.web3d.org/x3d/tools/X3dQualityAssurance/X3dValidator/src/java/stylesheets/X3dToXhtml.xslt 2012-04-21 20:36:09 UTC (rev 10845) +++ www.web3d.org/x3d/tools/X3dQualityAssurance/X3dValidator/src/java/stylesheets/X3dToXhtml.xslt 2012-04-21 20:36:52 UTC (rev 10846) @@ -19,7 +19,7 @@ <!-- xmlns:saxon="http://icl.com/saxon" saxon:trace="true" --> <!-- -Copyright (c) 1995-2010 held by the author(s). All rights reserved. +Copyright (c) 1995-2012 held by the author(s). All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -58,6 +58,8 @@ xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:saxon="http://icl.com/saxon" saxon:trace="no"> <xsl:import href="X3dExtrusionToSvgViaXslt1.1.xslt"/> + <!-- $baseUrlAvailable false means that stylesheet is being used by servlet or else styled results won't be in original directory --> + <xsl:param name="baseUrlAvailable"><xsl:text>true</xsl:text></xsl:param> <xsl:param name="linkImages"><xsl:text>false</xsl:text></xsl:param> <xsl:strip-space elements="*"/> @@ -66,13 +68,6 @@ <!-- start - - - - - - - - - - - - - - - - - - - - - - - --> <xsl:template match="/"> - <!-- DEBUG - <xsl:message> - <xsl:text>$linkImages=</xsl:text> - <xsl:value-of select="$linkImages"/> - </xsl:message> - --> - <!-- first produce supporting SVG figures --> <xsl:call-template name="produce-SVG-figures"> <!-- <xsl:with-param name="list" select="."/> --> @@ -502,6 +497,20 @@ <xsl:call-template name="process-attributes-in-order" /> <!-- finish initial tag of pair --> <xsl:text>> </xsl:text> + + <xsl:if test="(local-name() ='Scene')"> + <!-- DEBUG statements are here so that they are included in X3D Validator servlet output excerpt: + <xsl:comment> + <xsl:text>$linkImages=</xsl:text> + <xsl:value-of select="$linkImages"/> + </xsl:comment> + <xsl:comment> + <xsl:text>$baseUrlAvailable=</xsl:text> + <xsl:value-of select="$baseUrlAvailable"/> + </xsl:comment> + --> + </xsl:if> + <!-- indent children --> <div class="indent"> <xsl:apply-templates select="* | comment()" /> @@ -1453,10 +1462,10 @@ </xsl:when> <!-- tokenize and make single/multiple url references into actual <a href=""> links --> <xsl:when test=" (local-name()='url' or contains(local-name(), 'Url')) or - ((local-name(..)='meta' and local-name()='content' and (../@name='identifier' or ../@name='url' or ../@name='license' or ../@name='example' or ../@name='title' or ../@name='reference' or ../@name='requires' or ../@name='drawing' or ../@name='image' or ../@name='Image' or ../@name='map' or ../@name='chart' or ../@name='movie' or ../@name='MovingImage' or ../@name='photo' or ../@name='photograph' or ../@name='diagram' or ../@name='javadoc' or contains(../@name,'permission'))) and not(contains(normalize-space(.),' '))) or + ((local-name(..)='meta' and local-name()='content' and (../@name='identifier' or ../@name='url' or ../@name='license' or ../@name='example' or ../@name='title' or ../@name='reference' or ../@name='requires' or ../@name='drawing' or ../@name='image' or ../@name='Image' or ../@name='map' or ../@name='chart' or ../@name='movie' or ../@name='MovingImage' or ../@name='photo' or ../@name='photograph' or ../@name='diagram' or ../@name='javadoc' or contains(../@name,'permission')) and not(contains(normalize-space(.),' ')))) or ((local-name(..)='field' or local-name(..)='fieldValue') and (contains(../@name, 'Url') or contains(../@name, 'url')) and (local-name() = 'value')) or ((local-name(..)='field' or local-name(..)='ProtoDeclare' or local-name(..)='ExternProtoDeclare') and (local-name()='documentation')) or - (contains(.,'http://') or contains(.,'https://') or contains(.,'sftp://') or contains(.,'mailto:') or contains(.,'./') or contains(.,'/'))"> + (contains(.,'http://') or contains(.,'https://') or contains(.,'ftp://') or contains(.,'sftp://') or contains(.,'mailto:') or contains(.,'./') or contains(.,'/'))"> <!-- (starts-with(normalize-space(.),'http://') or starts-with(normalize-space(.),'https://'))"> --> <!-- <xsl:if test="local-name(..)='Script'"> <xsl:message> <xsl:text>... found Script parent, attribute </xsl:text> @@ -1467,6 +1476,13 @@ </xsl:if> --> <xsl:choose> + <xsl:when test="starts-with(normalize-space(.),'*')"> + <!-- *default example values* --> + <xsl:text> </xsl:text> + <span class="value"> + <xsl:value-of select="."/> + </span> + </xsl:when> <xsl:when test="starts-with(normalize-space(.),'ecmascript') or starts-with(normalize-space(.),'javascript')"> <xsl:text> </xsl:text> <xsl:element name="pre"> @@ -1499,6 +1515,7 @@ <xsl:with-param name="insertBreaks"><xsl:text>false</xsl:text></xsl:with-param> </xsl:call-template> </xsl:when> + <!-- check sftp before ftp --> <xsl:when test="contains(.,'sftp://')"> <xsl:text> </xsl:text> <xsl:value-of select="substring-before(.,'sftp://')"/> @@ -1508,6 +1525,15 @@ <xsl:with-param name="insertBreaks"><xsl:text>false</xsl:text></xsl:with-param> </xsl:call-template> </xsl:when> + <xsl:when test="contains(.,'ftp://')"> + <xsl:text> </xsl:text> + <xsl:value-of select="substring-before(.,'ftp://')"/> + <xsl:call-template name="URL-ize-MFString-elements"> + <xsl:with-param name="list" select="normalize-space(substring-after(.,substring-before(.,'ftp://')))"/> + <xsl:with-param name="urlsOnly"><xsl:text>true</xsl:text></xsl:with-param> + <xsl:with-param name="insertBreaks"><xsl:text>false</xsl:text></xsl:with-param> + </xsl:call-template> + </xsl:when> <xsl:when test="contains(.,'mailto:')"> <xsl:text> </xsl:text> <xsl:value-of select="substring-before(.,'mailto:')"/> @@ -1517,6 +1543,11 @@ <xsl:with-param name="insertBreaks"><xsl:text>false</xsl:text></xsl:with-param> </xsl:call-template> </xsl:when> + <xsl:when test="($baseUrlAvailable='false')"> + <span class="value"> + <xsl:value-of select="."/> + </span> + </xsl:when> <xsl:when test="contains(.,'../')"> <xsl:text> </xsl:text> <xsl:value-of select="substring-before(.,'../')"/> @@ -1859,10 +1890,30 @@ <xsl:choose> <xsl:when test="($urlsOnly='true') and not(contains($nextURL,'http://')) and not(contains($nextURL,'https://')) and not(contains($nextURL,'sftp://')) and not(contains($nextURL,'mailto:')) - and not(contains($nextURL,'./'))"> - <!-- merely output text --> - <xsl:value-of disable-output-escaping="yes" select="$nextURL"/> - <xsl:text> </xsl:text> + and not(contains($nextURL, 'ftp://')) and not(contains($nextURL,'./'))"> + <!-- if baseUrlAvailable is false then merely provide text, otherwise output style the output into link --> + <xsl:choose> + <xsl:when test="($baseUrlAvailable='true')"> + <xsl:text> </xsl:text> + <xsl:if test="$insertBreaks='true'"> + <xsl:text disable-output-escaping="yes"><br /></xsl:text> + </xsl:if> + <xsl:element name="a"> + <xsl:attribute name="href"> + <xsl:value-of disable-output-escaping="yes" select="$nextURL"/> + </xsl:attribute> + <xsl:value-of select="$nextURL"/> + </xsl:element> + <xsl:text> </xsl:text> + <xsl:if test="($insertBreaks='true') and not(starts-with(normalize-space($restURLs),'ftp://')) and not(starts-with(normalize-space($restURLs),'sftp://')) and not(starts-with(normalize-space($restURLs),'http://'))"> + <xsl:text disable-output-escaping="yes"><br /></xsl:text> + </xsl:if> + </xsl:when> + <xsl:otherwise> + <xsl:value-of disable-output-escaping="yes" select="$nextURL"/> + <xsl:text> </xsl:text> + </xsl:otherwise> + </xsl:choose> </xsl:when> <!-- handle sftp:// but only if it precedes http:// --> <xsl:when test="($urlsOnly='true') and (contains($nextURL,'sftp://')) and not(contains(substring-before($nextURL,'sftp://'),'http://'))"> @@ -1884,6 +1935,26 @@ <xsl:text disable-output-escaping="yes"><br /></xsl:text> </xsl:if> </xsl:when> + <!-- handle ftp:// but only if it precedes http:// and follows sftp:// --> + <xsl:when test="($urlsOnly='true') and (contains($nextURL,'ftp://')) and not(contains(substring-before($nextURL,'ftp://'),'http://'))"> + <!-- ftp:// found next --> + <xsl:value-of disable-output-escaping="yes" select="substring-before($nextURL,'ftp://')"/> + <xsl:if test="$insertBreaks='true'"> + <xsl:text disable-output-escaping="yes"><br /></xsl:text> + </xsl:if> + <xsl:element name="a"> + <xsl:attribute name="href"> + <xsl:text>ftp://</xsl:text> + <xsl:value-of select="normalize-space(substring-after($nextURL,'ftp://'))"/> + </xsl:attribute> + <xsl:text>ftp://</xsl:text> + <xsl:value-of select="normalize-space(substring-after($nextURL,'ftp://'))"/> + </xsl:element> + <xsl:text> </xsl:text> + <xsl:if test="($insertBreaks='true') and not(starts-with(normalize-space($restURLs),'ftp://')) and not(starts-with(normalize-space($restURLs),'http://'))"> + <xsl:text disable-output-escaping="yes"><br /></xsl:text> + </xsl:if> + </xsl:when> <!-- handle http:// --> <xsl:when test="($urlsOnly='true') and (contains($nextURL,'http://'))"> <!-- http:// found next --> @@ -1900,7 +1971,7 @@ <xsl:value-of select="normalize-space(substring-after($nextURL,'http://'))"/> </xsl:element> <xsl:text> </xsl:text> - <xsl:if test="($insertBreaks='true') and not(starts-with(normalize-space($restURLs),'sftp://')) and not(starts-with(normalize-space($restURLs),'http://'))"> + <xsl:if test="($insertBreaks='true') and not(starts-with(normalize-space($restURLs),'ftp://')) and not(starts-with(normalize-space($restURLs),'http://'))"> <xsl:text disable-output-escaping="yes"><br /></xsl:text> </xsl:if> </xsl:when> @@ -1920,10 +1991,18 @@ <xsl:value-of select="normalize-space(substring-after($nextURL,'https://'))"/> </xsl:element> <xsl:text> </xsl:text> - <xsl:if test="($insertBreaks='true') and not(starts-with(normalize-space($restURLs),'sftp://')) and not(starts-with(normalize-space($restURLs),'http://'))"> + <xsl:if test="($insertBreaks='true') and not(starts-with(normalize-space($restURLs),'ftp://')) and not(starts-with(normalize-space($restURLs),'http://'))"> <xsl:text disable-output-escaping="yes"><br /></xsl:text> </xsl:if> </xsl:when> + <xsl:when test="($baseUrlAvailable='false') and not(contains($nextURL,'://'))"> + <xsl:text>"</xsl:text> + <span class="value"> + <xsl:value-of select="normalize-space(translate($nextURL,'"',''))"/> + </span> + <xsl:text>"</xsl:text> + <xsl:text> </xsl:text> + </xsl:when> <xsl:otherwise> <!-- ($urlsOnly='false') --> <!-- output URL-ized nextURL --> <xsl:text>"</xsl:text> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bru...@us...> - 2013-04-05 23:08:10
|
Revision: 12031 http://x3d.svn.sourceforge.net/x3d/?rev=12031&view=rev Author: brutzman Date: 2013-04-05 23:07:59 +0000 (Fri, 05 Apr 2013) Log Message: ----------- various project updates Modified Paths: -------------- www.web3d.org/x3d/tools/X3dQualityAssurance/X3dValidator/nbproject/build-impl.xml www.web3d.org/x3d/tools/X3dQualityAssurance/X3dValidator/nbproject/project.properties www.web3d.org/x3d/tools/X3dQualityAssurance/X3dValidator/nbproject/project.xml www.web3d.org/x3d/tools/X3dQualityAssurance/X3dValidator/src/java/org/web3d/x3d/tools/X3dToolsConstants.java www.web3d.org/x3d/tools/X3dQualityAssurance/X3dValidator/src/java/stylesheets/X3dToXhtml.xslt Added Paths: ----------- www.web3d.org/x3d/tools/X3dQualityAssurance/X3dValidator/src/java/stylesheets/X3dSchematronValidityChecks.xslt Removed Paths: ------------- www.web3d.org/x3d/tools/X3dQualityAssurance/X3dValidator/src/java/stylesheets/X3dSchematronValidityChecks.xslt Modified: www.web3d.org/x3d/tools/X3dQualityAssurance/X3dValidator/nbproject/build-impl.xml =================================================================== --- www.web3d.org/x3d/tools/X3dQualityAssurance/X3dValidator/nbproject/build-impl.xml 2013-04-05 23:06:45 UTC (rev 12030) +++ www.web3d.org/x3d/tools/X3dQualityAssurance/X3dValidator/nbproject/build-impl.xml 2013-04-05 23:07:59 UTC (rev 12031) @@ -382,6 +382,11 @@ </and> </condition> </target> + <target name="-init-test-properties"> + <property name="test.binaryincludes" value="<nothing>"/> + <property name="test.binarytestincludes" value=""/> + <property name="test.binaryexcludes" value=""/> + </target> <target if="${nb.junit.single}" name="-init-macrodef-junit-single" unless="${nb.junit.batch}"> <macrodef name="junit" uri="http://www.netbeans.org/ns/web-project/2"> <attribute default="${includes}" name="includes"/> @@ -404,7 +409,7 @@ </sequential> </macrodef> </target> - <target if="${nb.junit.batch}" name="-init-macrodef-junit-batch" unless="${nb.junit.single}"> + <target depends="-init-test-properties" if="${nb.junit.batch}" name="-init-macrodef-junit-batch" unless="${nb.junit.single}"> <macrodef name="junit" uri="http://www.netbeans.org/ns/web-project/2"> <attribute default="${includes}" name="includes"/> <attribute default="${excludes}" name="excludes"/> @@ -418,6 +423,9 @@ <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}"> <filename name="@{testincludes}"/> </fileset> + <fileset dir="${build.test.classes.dir}" excludes="@{excludes},${excludes},${test.binaryexcludes}" includes="${test.binaryincludes}"> + <filename name="${test.binarytestincludes}"/> + </fileset> </batchtest> <syspropertyset> <propertyref prefix="test-sys-prop."/> @@ -544,7 +552,7 @@ </sequential> </macrodef> </target> - <target if="${nb.junit.batch}" name="-init-macrodef-junit-debug-batch"> + <target depends="-init-test-properties" if="${nb.junit.batch}" name="-init-macrodef-junit-debug-batch"> <macrodef name="junit-debug" uri="http://www.netbeans.org/ns/web-project/2"> <attribute default="${includes}" name="includes"/> <attribute default="${excludes}" name="excludes"/> @@ -558,6 +566,9 @@ <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}"> <filename name="@{testincludes}"/> </fileset> + <fileset dir="${build.test.classes.dir}" excludes="@{excludes},${excludes},${test.binaryexcludes}" includes="${test.binaryincludes}"> + <filename name="${test.binarytestincludes}"/> + </fileset> </batchtest> <syspropertyset> <propertyref prefix="test-sys-prop."/> @@ -810,11 +821,11 @@ pre NB7.2 profiling section; consider it deprecated --> <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-check" if="profiler.info.jvmargs.agent" name="profile-init"/> - <target name="-profile-pre-init"> + <target if="profiler.info.jvmargs.agent" name="-profile-pre-init"> <!-- Empty placeholder for easier customization. --> <!-- You can override this target in the ../build.xml file. --> </target> - <target name="-profile-post-init"> + <target if="profiler.info.jvmargs.agent" name="-profile-post-init"> <!-- Empty placeholder for easier customization. --> <!-- You can override this target in the ../build.xml file. --> </target> @@ -862,7 +873,7 @@ <target if="has.persistence.xml" name="-copy-persistence-xml"> <mkdir dir="${build.web.dir}/WEB-INF/classes/META-INF"/> <copy todir="${build.web.dir}/WEB-INF/classes/META-INF"> - <fileset dir="${persistence.xml.dir}" includes="persistence.xml"/> + <fileset dir="${persistence.xml.dir}" includes="persistence.xml orm.xml"/> </copy> </target> <target name="-post-compile"> @@ -1206,7 +1217,7 @@ <jvmarg value="${profiler.j2ee.agentID}"/> </nbstartprofiledserver> </target> - <target if="profiler.info.jvmargs.agent" name="-profile-test-single-pre72"> + <target depends="profile-init,compile-test-single" if="profiler.info.jvmargs.agent" name="-profile-test-single-pre72"> <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail> <nbprofiledirect> <classpath> Modified: www.web3d.org/x3d/tools/X3dQualityAssurance/X3dValidator/nbproject/project.properties =================================================================== --- www.web3d.org/x3d/tools/X3dQualityAssurance/X3dValidator/nbproject/project.properties 2013-04-05 23:06:45 UTC (rev 12030) +++ www.web3d.org/x3d/tools/X3dQualityAssurance/X3dValidator/nbproject/project.properties 2013-04-05 23:07:59 UTC (rev 12031) @@ -36,6 +36,7 @@ file.reference.xml-apis.jar=lib/xml-apis.jar includes=** j2ee.compile.on.save=true +j2ee.copy.static.files.on.save=true j2ee.deploy.on.save=true j2ee.platform=1.6-web j2ee.platform.classpath=${j2ee.server.home}/lib/annotations-api.jar:${j2ee.server.home}/lib/catalina-ant.jar:${j2ee.server.home}/lib/catalina-ha.jar:${j2ee.server.home}/lib/catalina-tribes.jar:${j2ee.server.home}/lib/catalina.jar:${j2ee.server.home}/lib/ecj-3.7.1.jar:${j2ee.server.home}/lib/el-api.jar:${j2ee.server.home}/lib/jasper-el.jar:${j2ee.server.home}/lib/jasper.jar:${j2ee.server.home}/lib/jsp-api.jar:${j2ee.server.home}/lib/servlet-api.jar:${j2ee.server.home}/lib/tomcat-api.jar:${j2ee.server.home}/lib/tomcat-coyote.jar:${j2ee.server.home}/lib/tomcat-dbcp.jar:${j2ee.server.home}/lib/tomcat-i18n-es.jar:${j2ee.server.home}/lib/tomcat-i18n-fr.jar:${j2ee.server.home}/lib/tomcat-i18n-ja.jar:${j2ee.server.home}/lib/tomcat-jdbc.jar:${j2ee.server.home}/lib/tomcat-util.jar Modified: www.web3d.org/x3d/tools/X3dQualityAssurance/X3dValidator/nbproject/project.xml =================================================================== --- www.web3d.org/x3d/tools/X3dQualityAssurance/X3dValidator/nbproject/project.xml 2013-04-05 23:06:45 UTC (rev 12030) +++ www.web3d.org/x3d/tools/X3dQualityAssurance/X3dValidator/nbproject/project.xml 2013-04-05 23:07:59 UTC (rev 12031) @@ -48,6 +48,9 @@ </test-roots> </data> <spellchecker-wordlist xmlns="http://www.netbeans.org/ns/spellchecker-wordlist/1"> + <word>codebase</word> + <word>HTML</word> + <word>https</word> <word>servlet</word> <word>Validator</word> </spellchecker-wordlist> Modified: www.web3d.org/x3d/tools/X3dQualityAssurance/X3dValidator/src/java/org/web3d/x3d/tools/X3dToolsConstants.java =================================================================== --- www.web3d.org/x3d/tools/X3dQualityAssurance/X3dValidator/src/java/org/web3d/x3d/tools/X3dToolsConstants.java 2013-04-05 23:06:45 UTC (rev 12030) +++ www.web3d.org/x3d/tools/X3dQualityAssurance/X3dValidator/src/java/org/web3d/x3d/tools/X3dToolsConstants.java 2013-04-05 23:07:59 UTC (rev 12031) @@ -329,6 +329,10 @@ * Reference: buildExamplesTemplate.xml * <property name="regexGarbledFloats" value="(\s|,|"|')(((\+|-)?((\.\d+)|(\d+\.\d*))((E|e)(\+|-)?\d+)?(\.|\+|-)+(\d*))|(\d+((\+|-)\d+)+))(\s|,|"|')"/> */ + /** Check for malformed floating point numbers. + * Reference: buildExamplesTemplate.xml + * <property name="regexGarbledFloats" value="(\s|,|"|')(((\+|-)?((\.\d+)|(\d+\.\d*))((E|e)(\+|-)?\d+)?(\.|\+|-)+(\d*))|(\d+((\+|-)\d+)+))(\s|,|"|')"/> + */ String REGEX_GARBLED_FLOATS = "(\\s|,|\"|')(((\\+|-)?((\\.\\d+)|(\\d+\\.\\d*))((E|e)?(\\+|-)?\\d+)?(\\.|\\+|-)+(\\d*))|(\\d+((\\+|-)\\d+)+))(\\s|,|\"|')"; /** Check for leading zeroes in integer or floating point numbers. Deleted: www.web3d.org/x3d/tools/X3dQualityAssurance/X3dValidator/src/java/stylesheets/X3dSchematronValidityChecks.xslt =================================================================== --- www.web3d.org/x3d/tools/X3dQualityAssurance/X3dValidator/src/java/stylesheets/X3dSchematronValidityChecks.xslt 2013-04-05 23:06:45 UTC (rev 12030) +++ www.web3d.org/x3d/tools/X3dQualityAssurance/X3dValidator/src/java/stylesheets/X3dSchematronValidityChecks.xslt 2013-04-05 23:07:59 UTC (rev 12031) @@ -1,58038 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="yes"?> -<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:iso="http://purl.oclc.org/dsdl/schematron" xmlns:sch="http://www.ascc.net/xml/schematron" version="1.0"> -<!--Implementers: please note that overriding process-prolog or process-root is - the preferred method for meta-stylesheets to use where possible. --> -<xsl:param name="archiveDirParameter"/> -<xsl:param name="archiveNameParameter"/> -<xsl:param name="fileNameParameter"/> -<xsl:param name="fileDirParameter"/> - -<!--PHASES--> - - -<!--PROLOG--> -<xsl:output xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:schold="http://www.ascc.net/xml/schematron" xmlns:svrl="http://purl.oclc.org/dsdl/svrl" method="xml" omit-xml-declaration="no" standalone="yes" indent="yes"/> - -<!--KEYS--> - - -<!--DEFAULT RULES--> - - -<!--MODE: SCHEMATRON-FULL-PATH--> -<!--This mode can be used to generate an ugly though full XPath for locators--> -<xsl:template match="*" mode="schematron-get-full-path"> -<xsl:apply-templates select="parent::*" mode="schematron-get-full-path"/> -<xsl:text>/</xsl:text> -<xsl:choose> -<xsl:when test="namespace-uri()=''"> -<xsl:value-of select="name()"/> -<xsl:variable name="p" select="1+ count(preceding-sibling::*[name()=name(current())])"/> -<xsl:if test="$p>1 or following-sibling::*[name()=name(current())]">[<xsl:value-of select="$p"/>]</xsl:if> -</xsl:when> -<xsl:otherwise> -<xsl:text>*[local-name()='</xsl:text> -<xsl:value-of select="local-name()"/> -<xsl:text>' and namespace-uri()='</xsl:text> -<xsl:value-of select="namespace-uri()"/> -<xsl:text>']</xsl:text> -<xsl:variable name="p" select="1+ count(preceding-sibling::*[local-name()=local-name(current())])"/> -<xsl:if test="$p>1 or following-sibling::*[local-name()=local-name(current())]">[<xsl:value-of select="$p"/>]</xsl:if> -</xsl:otherwise> -</xsl:choose> -</xsl:template> -<xsl:template match="@*" mode="schematron-get-full-path"> -<xsl:text>/</xsl:text> -<xsl:choose> -<xsl:when test="namespace-uri()=''">@<xsl:value-of select="name()"/> -</xsl:when> -<xsl:otherwise> -<xsl:text>@*[local-name()='</xsl:text> -<xsl:value-of select="local-name()"/> -<xsl:text>' and namespace-uri()='</xsl:text> -<xsl:value-of select="namespace-uri()"/> -<xsl:text>']</xsl:text> -</xsl:otherwise> -</xsl:choose> -</xsl:template> - -<!--MODE: SCHEMATRON-FULL-PATH-2--> -<!--This mode can be used to generate prefixed XPath for humans--> -<xsl:template match="node() | @*" mode="schematron-get-full-path-2"> -<xsl:for-each select="ancestor-or-self::*"> -<xsl:text>/</xsl:text> -<xsl:value-of select="name(.)"/> -<xsl:if test="preceding-sibling::*[name(.)=name(current())]"> -<xsl:text>[</xsl:text> -<xsl:value-of select="count(preceding-sibling::*[name(.)=name(current())])+1"/> -<xsl:text>]</xsl:text> -</xsl:if> -</xsl:for-each> -<xsl:if test="not(self::*)"> -<xsl:text/>/@<xsl:value-of select="name(.)"/> -</xsl:if> -</xsl:template> - -<!--MODE: GENERATE-ID-FROM-PATH --> -<xsl:template match="/" mode="generate-id-from-path"/> -<xsl:template match="text()" mode="generate-id-from-path"> -<xsl:apply-templates select="parent::*" mode="generate-id-from-path"/> -<xsl:value-of select="concat('.text-', 1+count(preceding-sibling::text()), '-')"/> -</xsl:template> -<xsl:template match="comment()" mode="generate-id-from-path"> -<xsl:apply-templates select="parent::*" mode="generate-id-from-path"/> -<xsl:value-of select="concat('.comment-', 1+count(preceding-sibling::comment()), '-')"/> -</xsl:template> -<xsl:template match="processing-instruction()" mode="generate-id-from-path"> -<xsl:apply-templates select="parent::*" mode="generate-id-from-path"/> -<xsl:value-of select="concat('.processing-instruction-', 1+count(preceding-sibling::processing-instruction()), '-')"/> -</xsl:template> -<xsl:template match="@*" mode="generate-id-from-path"> -<xsl:apply-templates select="parent::*" mode="generate-id-from-path"/> -<xsl:value-of select="concat('.@', name())"/> -</xsl:template> -<xsl:template match="*" mode="generate-id-from-path" priority="-0.5"> -<xsl:apply-templates select="parent::*" mode="generate-id-from-path"/> -<xsl:text>.</xsl:text> -<xsl:value-of select="concat('.',name(),'-',1+count(preceding-sibling::*[name()=name(current())]),'-')"/> -</xsl:template> -<!--MODE: SCHEMATRON-FULL-PATH-3--> -<!--This mode can be used to generate prefixed XPath for humans - (Top-level element has index)--> -<xsl:template match="node() | @*" mode="schematron-get-full-path-3"> -<xsl:for-each select="ancestor-or-self::*"> -<xsl:text>/</xsl:text> -<xsl:value-of select="name(.)"/> -<xsl:if test="parent::*"> -<xsl:text>[</xsl:text> -<xsl:value-of select="count(preceding-sibling::*[name(.)=name(current())])+1"/> -<xsl:text>]</xsl:text> -</xsl:if> -</xsl:for-each> -<xsl:if test="not(self::*)"> -<xsl:text/>/@<xsl:value-of select="name(.)"/> -</xsl:if> -</xsl:template> - -<!--MODE: GENERATE-ID-2 --> -<xsl:template match="/" mode="generate-id-2">U</xsl:template> -<xsl:template match="*" mode="generate-id-2" priority="2"> -<xsl:text>U</xsl:text> -<xsl:number level="multiple" count="*"/> -</xsl:template> -<xsl:template match="node()" mode="generate-id-2"> -<xsl:text>U.</xsl:text> -<xsl:number level="multiple" count="*"/> -<xsl:text>n</xsl:text> -<xsl:number count="node()"/> -</xsl:template> -<xsl:template match="@*" mode="generate-id-2"> -<xsl:text>U.</xsl:text> -<xsl:number level="multiple" count="*"/> -<xsl:text>_</xsl:text> -<xsl:value-of select="string-length(local-name(.))"/> -<xsl:text>_</xsl:text> -<xsl:value-of select="translate(name(),':','.')"/> -</xsl:template> -<!--Strip characters--> -<xsl:template match="text()" priority="-1"/> - -<!--SCHEMA METADATA--> -<xsl:template match="/"> -<svrl:schematron-output xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:schold="http://www.ascc.net/xml/schematron" xmlns:svrl="http://purl.oclc.org/dsdl/svrl" title="X3D Graphics Validity Checks using Schematron" schemaVersion=""> -<xsl:comment> -<xsl:value-of select="$archiveDirParameter"/> - <xsl:value-of select="$archiveNameParameter"/> - <xsl:value-of select="$fileNameParameter"/> - <xsl:value-of select="$fileDirParameter"/> -</xsl:comment> -<svrl:active-pattern> -<xsl:apply-templates/> -</svrl:active-pattern> -<xsl:apply-templates select="/" mode="M1"/> -</svrl:schematron-output> -</xsl:template> - -<!--SCHEMATRON PATTERNS--> -<svrl:text xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:schold="http://www.ascc.net/xml/schematron" xmlns:svrl="http://purl.oclc.org/dsdl/svrl">X3D Graphics Validity Checks using Schematron</svrl:text> - -<!--PATTERN --> - - - <!--RULE --> -<xsl:template match="X3D" priority="1151" mode="M1"> -<svrl:fired-rule xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:schold="http://www.ascc.net/xml/schematron" xmlns:svrl="http://purl.oclc.org/dsdl/svrl" context="X3D"/> -<xsl:variable name="xsltVersion" select="system-property('xsl:version')"/> -<xsl:variable name="xsltVendor" select="system-property('xsl:vendor')"/> - - <!--ASSERT error--> -<xsl:choose> -<xsl:when test="not(@DEF)"/> -<xsl:otherwise> -<svrl:failed-assert xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:schold="http://www.ascc.net/xml/schematron" xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="not(@DEF)"> -<xsl:attribute name="role">error</xsl:attribute> -<xsl:attribute name="location"> -<xsl:apply-templates select="." mode="schematron-get-full-path"/> -</xsl:attribute> -<svrl:text><<xsl:text/> -<xsl:value-of select="name(.)"/> -<xsl:text/> DEF='<xsl:text/> -<xsl:value-of select="@DEF"/> -<xsl:text/>'/> but this element is not allowed to have a DEF attribute </svrl:text> -</svrl:failed-assert> -</xsl:otherwise> -</xsl:choose> - - <!--ASSERT error--> -<xsl:choose> -<xsl:when test="not(@USE)"/> -<xsl:otherwise> -<svrl:failed-assert xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:schold="http://www.ascc.net/xml/schematron" xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="not(@USE)"> -<xsl:attribute name="role">error</xsl:attribute> -<xsl:attribute name="location"> -<xsl:apply-templates select="." mode="schematron-get-full-path"/> -</xsl:attribute> -<svrl:text><<xsl:text/> -<xsl:value-of select="name(.)"/> -<xsl:text/> USE='<xsl:text/> -<xsl:value-of select="@USE"/> -<xsl:text/>'/> but this element is not allowed to have a USE attribute </svrl:text> -</svrl:failed-assert> -</xsl:otherwise> -</xsl:choose> -<xsl:variable name="fullProfile" select=" //Arc2D or //ArcClose2D or //Circle2D or //Contour2D or //ContourPolyline2D or //CoordinateDouble or //CoordinateInterpolator2D or //DISEntityManager or //DISEntityTypeMapping or //Disk2D or //EspduTransform or //FillProperties or //GeoCoordinate or //GeoElevationGrid or //GeoLocation or //GeoLOD or //GeoMetadata or //GeoOrigin or //GeoPositionInterpolator or //GeoTouchSensor or //GeoViewpoint or //HAnimDisplacer or //HAnimHumanoid or //HAnimJoint or //HAnimSegment or //HAnimSite or //NurbsCurve or //NurbsCurve2D or //NurbsOrientationInterpolator or //NurbsPatchSurface or //NurbsPositionInterpolator or //NurbsSet or //NurbsSurfaceInterpolator or //NurbsSweptSurface or //NurbsSwungSurface or //NurbsTextureCoordinate or //NurbsTrimmedSurface or //PositionInterpolator2D or //ReceiverPdu or //SignalPdu or //StaticGroup or //TextureBackground or //TransmitterPdu"/> -<xsl:variable name="immersiveProfile" select="not($fullProfile) and ( //ExternProtoDeclare or //field or //fieldValue or //IS or //connect or //ProtoDeclare or //ProtoInterface or //ProtoBody or //ProtoInstance or //AudioClip or //Billboard or //Collision or //Extrusion or //Fog or //FontStyle or //LineProperties or //LoadSensor or //LOD or //MovieTexture or //Polyline2D or //Polypoint2D or //Rectangle2D or //Script or //Sound or //Text or //TriangleSet2D or //VisibilitySensor)"/> -<xsl:variable name="interactiveProfile" select="not($fullProfile) and not($immersiveProfile) and ( //Anchor or //BooleanFilter or //BooleanSequencer or //BooleanToggle or //BooleanTrigger or //CylinderSensor or //ElevationGrid or //Inline or //IMPORT or //EXPORT or //IntegerSequencer or //IntegerTrigger or //KeySensor or //PlaneSensor or //PointLight or //ProximitySensor or //SphereSensor or //SpotLight or //StringSensor or //Switch or //TimeTrigger or //TouchSensor)"/> -<xsl:variable name="cadComponentNodes" select=" ( //CADAssembly or //CADFace or //CADLayer or //CADPart or //IndexedQuadSet or //QuadSet)"/> -<xsl:variable name="interchangeProfile" select="not($fullProfile) and not($immersiveProfile) and not($interactiveProfile) and not($cadComponentNodes) and ( //Appearance or //Background or //Box or //Color or //ColorInterpolator or //ColorRGBA or //Cone or //Coordinate or //CoordinateInterpolator or //Cylinder or //DirectionalLight or //Group or //ImageTexture or //IndexedFaceSet or //IndexedLineSet or //IndexedTriangleFanSet or //IndexedTriangleSet or //IndexedTriangleStripSet or //LineSet or //Material or //MultiTexture or //MultiTextureCoordinate or //MultiTextureTransform or //NavigationInfo or //Normal or //NormalInterpolator or //OrientationInterpolator or //PixelTexture or //PointSet or //PositionInterpolator or //ScalarInterpolator or //Shape or //Sphere or //TextureCoordinate or //TextureCoordinateGenerator or //TextureTransform or //TimeSensor or //Transform or //TriangleFanSet or //TriangleSet or //TriangleStripSet or //Viewpoint or //WorldInfo)"/> -<xsl:variable name="cadInterchangeProfile" select="not($fullProfile) and not($immersiveProfile) and not($interactiveProfile) and not($interchangeProfile) and ( $cadComponentNodes or //Appearance or //Billboard or //Collision or //Color or //ColorRGBA or //Coordinate or //DirectionalLight or //FragmentShader or //Group or //ImageTexture or //IndexedLineSet or //IndexedTriangleFanSet or //IndexedTriangleSet or //IndexedTriangleStripSet or //LineProperties or //LineSet or //LOD or //Material or //MetadataDouble or //MetadataFloat or //MetadataInteger or //MetadataSet or //MetadataString or //MultiShader or //MultiTexture or //MultiTextureCoordinate or //MultiTextureTransform or //NavigationInfo or //Normal or //PixelTexture or //PointSet or //Shader or //ShaderAppearance or //Shape or //TextureCoordinate or //TextureCoordinateGenerator or //TextureTransform or //Transform or //TriangleFanSet or //TriangleSet or //TriangleStripSet or //VertexShader or //Viewpoint or //WorldInfo)"/> -<xsl:variable name="coreProfile" select="not($fullProfile) and not($immersiveProfile) and not($interactiveProfile) and not($cadComponentNodes) and not($interchangeProfile) and ( //component or //head or //meta or //MetadataDouble or //MetadataFloat or //MetadataInteger or //MetadataSet or //MetadataString or //ROUTE or //X3D)"/> -<xsl:variable name="profileLegal" select="(@profile='Full') or (@profile='Immersive') or (@profile='Interactive') or (@profile='CADInterchange') or (@profile='Interchange') or (@profile='Core')"/> -<xsl:variable name="profileMatch" select="(@profile='Full' and $fullProfile) or (@profile='Immersive' and $immersiveProfile) or (@profile='Interactive' and $interactiveProfile) or (@profile='CADInterchange' and $cadInterchangeProfile) or (@profile='Interchange' and $interchangeProfile) or (@profile='Core' and $coreProfile)"/> - - <!--ASSERT error--> -<xsl:choose> -<xsl:when test=" (@profile='Full') or ((@profile='Immersive') and ($coreProfile or $interchangeProfile or $interactiveProfile or $immersiveProfile)) or ((@profile='Interactive') and ($coreProfile or $interchangeProfile or $interactiveProfile)) or ((@profile='Immersive') and (/X3D/head/component[@name='CADGeometry']) and ($coreProfile or $cadInterchangeProfile)) or ((@profile='CADInterchange') and ($coreProfile or $cadInterchangeProfile)) or ((@profile='Interchange') and ($coreProfile or $interchangeProfile)) or ((@profile='Core') and ($coreProfile)) or ($profileLegal and /X3D/head/component)"/> -<xsl:otherwise> -<svrl:failed-assert xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:schold="http://www.ascc.net/xml/schematron" xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="(@profile='Full') or ((@profile='Immersive') and ($coreProfile or $interchangeProfile or $interactiveProfile or $immersiveProfile)) or ((@profile='Interactive') and ($coreProfile or $interchangeProfile or $interactiveProfile)) or ((@profile='Immersive') and (/X3D/head/component[@name='CADGeometry']) and ($coreProfile or $cadInterchangeProfile)) or ((@profile='CADInterchange') and ($coreProfile or $cadInterchangeProfile)) or ((@profile='Interchange') and ($coreProfile or $interchangeProfile)) or ((@profile='Core') and ($coreProfile)) or ($profileLegal and /X3D/head/component)"> -<xsl:attribute name="role">error</xsl:attribute> -<xsl:attribute name="location"> -<xsl:apply-templates select="." mode="schematron-get-full-path"/> -</xsl:attribute> -<svrl:text><X3D profile='<xsl:text/> -<xsl:value-of select="@profile"/> -<xsl:text/>'> doesn't match contained nodes, increase profile or add needed <component/> definition(s) </svrl:text> -</svrl:failed-assert> -</xsl:otherwise> -</xsl:choose> - - <!--REPORT info--> -<xsl:if test="$profileLegal and not($profileMatch) and not(/X3D/head/component) and not(//Inline) and $fullProfile"> -<svrl:successful-report xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:schold="http://www.ascc.net/xml/schematron" xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="$profileLegal and not($profileMatch) and not(/X3D/head/component) and not(//Inline) and $fullProfile"> -<xsl:attribute name="role">info</xsl:attribute> -<xsl:attribute name="location"> -<xsl:apply-templates select="." mode="schematron-get-full-path"/> -</xsl:attribute> -<svrl:text><X3D profile='<xsl:text/> -<xsl:value-of select="@profile"/> -<xsl:text/>'> is indicated, but nodes in scene have actual profile='Full' </svrl:text> -</svrl:successful-report> -</xsl:if> - - <!--REPORT info--> -<xsl:if test="$profileLegal and not($profileMatch) and not(/X3D/head/component) and not(//Inline) and $immersiveProfile"> -<svrl:successful-report xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:schold="http://www.ascc.net/xml/schematron" xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="$profileLegal and not($profileMatch) and not(/X3D/head/component) and not(//Inline) and $immersiveProfile"> -<xsl:attribute name="role">info</xsl:attribute> -<xsl:attribute name="location"> -<xsl:apply-templates select="." mode="schematron-get-full-path"/> -</xsl:attribute> -<svrl:text><X3D profile='<xsl:text/> -<xsl:value-of select="@profile"/> -<xsl:text/>'> is indicated, but nodes in scene have actual profile='Immersive' </svrl:text> -</svrl:successful-report> -</xsl:if> - - <!--REPORT info--> -<xsl:if test="$profileLegal and not($profileMatch) and not(/X3D/head/component) and not(//Inline) and $interactiveProfile"> -<svrl:successful-report xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:schold="http://www.ascc.net/xml/schematron" xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="$profileLegal and not($profileMatch) and not(/X3D/head/component) and not(//Inline) and $interactiveProfile"> -<xsl:attribute name="role">info</xsl:attribute> -<xsl:attribute name="location"> -<xsl:apply-templates select="." mode="schematron-get-full-path"/> -</xsl:attribute> -<svrl:text><X3D profile='<xsl:text/> -<xsl:value-of select="@profile"/> -<xsl:text/>'> is indicated, but nodes in scene have actual profile='Interactive' </svrl:text> -</svrl:successful-report> -</xsl:if> - - <!--REPORT info--> -<xsl:if test="$profileLegal and not($profileMatch) and not(/X3D/head/component) and not(//Inline) and $cadInterchangeProfile"> -<svrl:successful-report xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:schold="http://www.ascc.net/xml/schematron" xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="$profileLegal and not($profileMatch) and not(/X3D/head/component) and not(//Inline) and $cadInterchangeProfile"> -<xsl:attribute name="role">info</xsl:attribute> -<xsl:attribute name="location"> -<xsl:apply-templates select="." mode="schematron-get-full-path"/> -</xsl:attribute> -<svrl:text><X3D profile='<xsl:text/> -<xsl:value-of select="@profile"/> -<xsl:text/>'> is indicated, but nodes in scene have actual profile='CADInterchange' </svrl:text> -</svrl:successful-report> -</xsl:if> - - <!--REPORT info--> -<xsl:if test="$profileLegal and not($profileMatch) and not(/X3D/head/component) and not(//Inline) and $interchangeProfile"> -<svrl:successful-report xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:schold="http://www.ascc.net/xml/schematron" xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="$profileLegal and not($profileMatch) and not(/X3D/head/component) and not(//Inline) and $interchangeProfile"> -<xsl:attribute name="role">info</xsl:attribute> -<xsl:attribute name="location"> -<xsl:apply-templates select="." mode="schematron-get-full-path"/> -</xsl:attribute> -<svrl:text><X3D profile='<xsl:text/> -<xsl:value-of select="@profile"/> -<xsl:text/>'> is indicated, but nodes in scene have actual profile='Interchange' </svrl:text> -</svrl:successful-report> -</xsl:if> - - <!--REPORT info--> -<xsl:if test="$profileLegal and not($profileMatch) and not(/X3D/head/component) and not(//Inline) and $coreProfile"> -<svrl:successful-report xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:schold="http://www.ascc.net/xml/schematron" xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="$profileLegal and not($profileMatch) and not(/X3D/head/component) and not(//Inline) and $coreProfile"> -<xsl:attribute name="role">info</xsl:attribute> -<xsl:attribute name="location"> -<xsl:apply-templates select="." mode="schematron-get-full-path"/> -</xsl:attribute> -<svrl:text><X3D profile='<xsl:text/> -<xsl:value-of select="@profile"/> -<xsl:text/>'> is indicated, but nodes in scene have actual profile='Core' </svrl:text> -</svrl:successful-report> -</xsl:if> - - <!--REPORT info--> -<xsl:if test="not($profileLegal) and $fullProfile"> -<svrl:successful-report xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:schold="http://www.ascc.net/xml/schematron" xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="not($profileLegal) and $fullProfile"> -<xsl:attribute name="role">info</xsl:attribute> -<xsl:attribute name="location"> -<xsl:apply-templates select="." mode="schematron-get-full-path"/> -</xsl:attribute> -<svrl:text><X3D profile='<xsl:text/> -<xsl:value-of select="@profile"/> -<xsl:text/>'> has illegal value, actual profile='Full' </svrl:text> -</svrl:successful-report> -</xsl:if> - - <!--REPORT info--> -<xsl:if test="not($profileLegal) and $immersiveProfile"> -<svrl:successful-report xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:schold="http://www.ascc.net/xml/schematron" xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="not($profileLegal) and $immersiveProfile"> -<xsl:attribute name="role">info</xsl:attribute> -<xsl:attribute name="location"> -<xsl:apply-templates select="." mode="schematron-get-full-path"/> -</xsl:attribute> -<svrl:text><X3D profile='<xsl:text/> -<xsl:value-of select="@profile"/> -<xsl:text/>'> has illegal value, actual profile='Immersive' </svrl:text> -</svrl:successful-report> -</xsl:if> - - <!--REPORT info--> -<xsl:if test="not($profileLegal) and $interactiveProfile"> -<svrl:successful-report xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:schold="http://www.ascc.net/xml/schematron" xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="not($profileLegal) and $interactiveProfile"> -<xsl:attribute name="role">info</xsl:attribute> -<xsl:attribute name="location"> -<xsl:apply-templates select="." mode="schematron-get-full-path"/> -</xsl:attribute> -<svrl:text><X3D profile='<xsl:text/> -<xsl:value-of select="@profile"/> -<xsl:text/>'> has illegal value, actual profile='Interactive' </svrl:text> -</svrl:successful-report> -</xsl:if> - - <!--REPORT info--> -<xsl:if test="not($profileLegal) and $cadInterchangeProfile"> -<svrl:successful-report xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:schold="http://www.ascc.net/xml/schematron" xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="not($profileLegal) and $cadInterchangeProfile"> -<xsl:attribute name="role">info</xsl:attribute> -<xsl:attribute name="location"> -<xsl:apply-templates select="." mode="schematron-get-full-path"/> -</xsl:attribute> -<svrl:text><X3D profile='<xsl:text/> -<xsl:value-of select="@profile"/> -<xsl:text/>'> has illegal value, actual profile='CADInterchange' </svrl:text> -</svrl:successful-report> -</xsl:if> - - <!--REPORT info--> -<xsl:if test="not($profileLegal) and $interchangeProfile"> -<svrl:successful-report xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:schold="http://www.ascc.net/xml/schematron" xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="not($profileLegal) and $interchangeProfile"> -<xsl:attribute name="role">info</xsl:attribute> -<xsl:attribute name="location"> -<xsl:apply-templates select="." mode="schematron-get-full-path"/> -</xsl:attribute> -<svrl:text><X3D profile='<xsl:text/> -<xsl:value-of select="@profile"/> -<xsl:text/>'> has illegal value, actual profile='Interchange' </svrl:text> -</svrl:successful-report> -</xsl:if> - - <!--REPORT info--> -<xsl:if test="not($profileLegal) and $interactiveProfile"> -<svrl:successful-report xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:schold="http://www.ascc.net/xml/schematron" xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="not($profileLegal) and $interactiveProfile"> -<xsl:attribute name="role">info</xsl:attribute> -<xsl:attribute name="location"> -<xsl:apply-templates select="." mode="schematron-get-full-path"/> -</xsl:attribute> -<svrl:text><X3D profile='<xsl:text/> -<xsl:value-of select="@profile"/> -<xsl:text/>'> has illegal value, actual profile='Interactive' </svrl:text> -</svrl:successful-report> -</xsl:if> - - <!--REPORT info--> -<xsl:if test="not($profileLegal) and $coreProfile"> -<svrl:successful-report xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:schold="http://www.ascc.net/xml/schematron" xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="not($profileLegal) and $coreProfile"> -<xsl:attribute name="role">info</xsl:attribute> -<xsl:attribute name="location"> -<xsl:apply-templates select="." mode="schematron-get-full-path"/> -</xsl:attribute> -<svrl:text><X3D profile='<xsl:text/> -<xsl:value-of select="@profile"/> -<xsl:text/>'> has illegal value, actual profile='Core' </svrl:text> -</svrl:successful-report> -</xsl:if> - - <!--REPORT diagnostic--> -<xsl:if test="false()"> -<svrl:successful-report xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:schold="http://www.ascc.net/xml/schematron" xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="false()"> -<xsl:attribute name="role">diagnostic</xsl:attribute> -<xsl:attribute name="location"> -<xsl:apply-templates select="." mode="schematron-get-full-path"/> -</xsl:attribute> -<svrl:text>XSLT stylesheet information: xsl:version=<xsl:text/> -<xsl:value-of select="$xsltVersion"/> -<xsl:text/>, xsl:vendor=<xsl:text/> -<xsl:value-of select="$xsltVendor"/> -<xsl:text/> </svrl:text> -</svrl:successful-report> -</xsl:if> - - <!--ASSERT error--> -<xsl:choose> -<xsl:when test="@version"/> -<xsl:otherwise> -<svrl:failed-assert xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:schold="http://www.ascc.net/xml/schematron" xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@version"> -<xsl:attribute name="role">error</xsl:attribute> -<xsl:attribute name="location"> -<xsl:apply-templates select="." mode="schematron-get-full-path"/> -</xsl:attribute> -<svrl:text>X3D root element must include version number. </svrl:text> -</svrl:failed-assert> -</xsl:otherwise> -</xsl:choose> - - <!--ASSERT error--> -<xsl:choose> -<xsl:when test="@version='3.0' or @version='3.1' or @version='3.2' or @version='3.3'"/> -<xsl:otherwise> -<svrl:failed-assert xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:schold="http://www.ascc.net/xml/schematron" xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@version='3.0' or @version='3.1' or @version='3.2' or @version='3.3'"> -<xsl:attribute name="role">error</xsl:attribute> -<xsl:attribute name="location"> -<xsl:apply-templates select="." mode="schematron-get-full-path"/> -</xsl:attribute> -<svrl:text>X3D version must be 3.0, 3.1, 3.2 or 3.3 </svrl:text> -</svrl:failed-assert> -</xsl:otherwise> -</xsl:choose> -<xsl:apply-templates select="@*|*" mode="M1"/> -</xsl:template> - - <!--RULE --> -<xsl:template match="Scene" priority="1150" mode="M1"> -<svrl:fired-rule xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:schold="http://www.ascc.net/xml/schematron" xmlns:svrl="http://purl.oclc.org/dsdl/svrl" context="Scene"/> - - <!--ASSERT error--> -<xsl:choose> -<xsl:when test="not(@DEF)"/> -<xsl:otherwise> -<svrl:failed-assert xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:schold="http://www.ascc.net/xml/schematron" xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="not(@DEF)"> -<xsl:attribute name="role">error</xsl:attribute> -<xsl:attribute name="location"> -<xsl:apply-templates select="." mode="schematron-get-full-path"/> -</xsl:attribute> -<svrl:text><<xsl:text/> -<xsl:value-of select="name(.)"/> -<xsl:text/> DEF='<xsl:text/> -<xsl:value-of select="@DEF"/> -<xsl:text/>'/> but this element is not allowed to have a DEF attribute </svrl:text> -</svrl:failed-assert> -</xsl:otherwise> -</xsl:choose> - - <!--ASSERT error--> -<xsl:choose> -<xsl:when test="not(@USE)"/> -<xsl:otherwise> -<svrl:failed-assert xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:schold="http://www.ascc.net/xml/schematron" xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="not(@USE)"> -<xsl:attribute name="role">error</xsl:attribute> -<xsl:attribute name="location"> -<xsl:apply-templates select="." mode="schematron-get-full-path"/> -</xsl:attribute> -<svrl:text><<xsl:text/> -<xsl:value-of select="name(.)"/> -<xsl:text/> USE='<xsl:text/> -<xsl:value-of select="@USE"/> -<xsl:text/>'/> but this element is not allowed to have a USE attribute </svrl:text> -</svrl:failed-assert> -</xsl:otherwise> -</xsl:choose> -<xsl:apply-templates select="@*|*" mode="M1"/> -</xsl:template> - - <!--RULE --> -<xsl:template match="head" priority="1149" mode="M1"> -<svrl:fired-rule xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:schold="http://www.ascc.net/xml/schematron" xmlns:svrl="http://purl.oclc.org/dsdl/svrl" context="head"/> -<xsl:variable name="title" select="meta[@name='title']/@content"/> -<xsl:variable name="identifier" select="meta[@name='identifier']/@content"/> -<xsl:variable name="created" select="meta[@name='creator']/@created"/> -<xsl:variable name="modified" select="meta[@name='creator']/@modified"/> -<xsl:variable name="translated" select="meta[@name='creator']/@translated"/> - - <!--ASSERT error--> -<xsl:choose> -<xsl:when test="not(@DEF)"/> -<xsl:otherwise> -<svrl:failed-assert xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:schold="http://www.ascc.net/xml/schematron" xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="not(@DEF)"> -<xsl:attribute name="role">error</xsl:attribute> -<xsl:attribute name="location"> -<xsl:apply-templates select="." mode="schematron-get-full-path"/> -</xsl:attribute> -<svrl:text><<xsl:text/> -<xsl:value-of select="name(.)"/> -<xsl:text/> DEF='<xsl:text/> -<xsl:value-of select="@DEF"/> -<xsl:text/>'/> but this element is not allowed to have a DEF attribute </svrl:text> -</svrl:failed-assert> -</xsl:otherwise> -</xsl:choose> - - <!--ASSERT error--> -<xsl:choose> -<xsl:when test="not(@USE)"/> -<xsl:otherwise> -<svrl:failed-assert xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:schold="http://www.ascc.net/xml/schematron" xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="not(@USE)"> -<xsl:attribute name="role">error</xsl:attribute> -<xsl:attribute name="location"> -<xsl:apply-templates select="." mode="schematron-get-full-path"/> -</xsl:attribute> -<svrl:text><<xsl:text/> -<xsl:value-of select="name(.)"/> -<xsl:text/> USE='<xsl:text/> -<xsl:value-of select="@USE"/> -<xsl:text/>'/> but this element is not allowed to have a USE attribute </svrl:text> -</svrl:failed-assert> -</xsl:otherwise> -</xsl:choose> - - <!--REPORT warning--> -<xsl:if test="meta/@content[starts-with(.,'*enter')]"> -<svrl:successful-report xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:schold="http://www.ascc.net/xml/schematron" xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="meta/@content[starts-with(.,'*enter')]"> -<xsl:attribute name="role">warning</xsl:attribute> -<xsl:attribute name="location"> -<xsl:apply-templates select="." mode="schematron-get-full-path"/> -</xsl:attribute> -<svrl:text>Update all meta tag(s) with content='*enter new value...'</svrl:text> -</svrl:successful-report> -</xsl:if> - - <!--ASSERT warning--> -<xsl:choose> -<xsl:when test="meta/@name='title'"/> -<xsl:otherwise> -<svrl:failed-assert xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:schold="http://www.ascc.net/xml/schematron" xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="meta/@name='title'"> -<xsl:attribute name="role">warning</xsl:attribute> -<xsl:attribute name="location"> -<xsl:apply-templates select="." mode="schematron-get-full-path"/> -</xsl:attribute> -<svrl:text>Missing X3D filename in meta tag, should appear as <meta name='title' content='FileName.x3d'/> </svrl:text> -</svrl:failed-assert> -</xsl:otherwise> -</xsl:choose> - - <!--ASSERT warning--> -<xsl:choose> -<xsl:when test="meta/@name='identifier'"/> -<xsl:otherwise> -<svrl:failed-assert xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:schold="http://www.ascc.net/xml/schematron" xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="meta/@name='identifier'"> -<xsl:attribute name="role">warning</xsl:attribute> -<xsl:attribute name="location"> -<xsl:apply-templates select="." mode="schematron-get-full-path"/> -</xsl:attribute> -<svrl:text>url for X3D file should appear in <meta name='identifier' content='http://someAddress/somePath/FileName.x3d'/> </svrl:text> -</svrl:failed-assert> -</xsl:otherwise> -</xsl:choose> - - <!--REPORT warning--> -<xsl:if test="(meta/@name='identifier') and (string-length($title) > 0) and not(contains($identifier, $title))"> -<svrl:successful-report xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:schold="http://www.ascc.net/xml/schematron" xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="(meta/@name='identifier') and (string-length($title) > 0) and not(contains($identifier, $title))"> -<xsl:attribute name="role">warning</xsl:attribute> -<xsl:attribute name="location"> -<xsl:apply-templates select="." mode="schematron-get-full-path"/> -</xsl:attribute> -<svrl:text>X3D/head/meta title (<xsl:text/> -<xsl:value-of select="$title"/> -<xsl:text/>) expected at end of identifier (url) value </svrl:text> -</svrl:successful-report> -</xsl:if> - - <!--ASSERT warning--> -<xsl:choose> -<xsl:when test="(string-length($identifier)=0) or starts-with($identifier, 'http://') or starts-with($identifier, 'https://')"/> -<xsl:otherwise> -<svrl:failed-assert xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:schold="http://www.ascc.net/xml/schematron" xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="(string-length($identifier)=0) or starts-with($identifier, 'http://') or starts-with($identifier, 'https://')"> -<xsl:attribute name="role">warning</xsl:attribute> -<xsl:attribute name="location"> -<xsl:apply-templates select="." mode="schematron-get-full-path"/> -</xsl:attribute> -<svrl:text>X3D/head/meta identifier (url) content should start with http:// or 'https:// </svrl:text> -</svrl:failed-assert> -</xsl:otherwise> -</xsl:choose> - - <!--ASSERT warning--> -<xsl:choose> -<xsl:when test="meta/@name='creator'"/> -<xsl:otherwise> -<svrl:failed-assert xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:schold="http://www.ascc.net/xml/schematron" xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="meta/@name='creator'"> -<xsl:attribute name="role">warning</xsl:attribute> -<xsl:attribute name="location"> -<xsl:apply-templates select="." mode="schematron-get-full-path"/> -</xsl:attribute> -<svrl:text>Missing name of X3D scene author in meta tag, add <meta name='creator' content='Author Name'/> </svrl:text> -</svrl:failed-assert> -</xsl:otherwise> -</xsl:choose> - - <!--ASSERT warning--> -<xsl:choose> -<xsl:when test="meta/@name='description'"/> -<xsl:otherwise> -<svrl:failed-assert xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:schold="http://www.ascc.net/xml/schematron" xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="meta/@name='description'"> -<xsl:attribute name="role">warning</xsl:attribute> -<xsl:attribute name="location"> -<xsl:apply-templates select="." mode="schematron-get-full-path"/> -</xsl:attribute> -<svrl:text>Missing X3D scene description in meta tag, should appear as <meta name='description' content='topic sentence plus good summary'/> </svrl:text> -</svrl:failed-assert> -</xsl:otherwise> -</xsl:choose> - - <!--ASSERT warning--> -<xsl:choose> -<xsl:when test="meta/@name='generator'"/> -<xsl:otherwise> -<svrl:failed-assert xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:schold="http://www.ascc.net/xml/schematron" xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="meta/@name='generator'"> -<xsl:attribute name="role">warning</xsl:attribute> -<xsl:attribute name="location"> -<xsl:apply-templates select="." mode="schematron-get-full-path"/> -</xsl:attribute> -<svrl:text>identify editor used, for example <meta name='generator' content='X3D-Edit, https://savage.nps.edu/X3D-Edit'/> </svrl:text> -</svrl:failed-assert> -</xsl:otherwise> -</xsl:choose> -<xsl:apply-templates select="@*|*" mode="M1"/> -</xsl:template> - - <!--RULE --> -<xsl:template match="meta[(@name='error') or (@name='warning') or (@name='hint') or (@name='info')]" priority="1148" mode="M1"> -<svrl:fired-rule xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:schold="http://www.ascc.net/xml/schematron" xmlns:svrl="http://purl.oclc.org/dsdl/svrl" context="meta[(@name='error') or (@name='warning') or (@name='hint') or (@name='info')]"/> - - <!--REPORT diagnostic--> -<xsl:if test="true()"> -<svrl:successful-report xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:schold="http://www.ascc.net/xml/schematron" xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="true()"> -<xsl:attribute name="role">diagnostic</xsl:attribute> -<xsl:attribute name="location"> -<xsl:apply-templates select="." mode="schematron-get-full-path"/> -</xsl:attribute> -<svrl:text><meta name='<xsl:text/> -<xsl:value-of select="@name"/> -<xsl:text/>' content='<xsl:text/> -<xsl:value-of select="@content"/> -<xsl:text/>'/></svrl:text> -</svrl:successful-report> -</xsl:if> - - <!--ASSERT error--> -<xsl:choose> -<xsl:when test="@content"/> -<xsl:otherwise> -<svrl:failed-assert xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:schold="http://www.ascc.net/xml/schematron" xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@content"> -<xsl:attribute name="role">error</xsl:attribute> -<xsl:attribute name="location"> -<xsl:apply-templates select="." mode="schematron-get-full-path"/> -</xsl:attribute> -<svrl:text><meta name='<xsl:text/> -<xsl:value-of select="@name"/> -<xsl:text/>' content=''/> is missing required value for content</svrl:text> -</svrl:failed-assert> -</xsl:otherwise> -</xsl:choose> -<xsl:apply-templates select="@*|*" mode="M1"/> -</xsl:template> - - <!--RULE --> -<xsl:template match="meta" priority="1147" mode="M1"> -<svrl:fired-rule xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:schold="http://www.ascc.net/xml/schematron" xmlns:svrl="http://purl.oclc.org/dsdl/svrl" context="meta"/> - - <!--ASSERT error--> -<xsl:choose> -<xsl:when test="@name"/> -<xsl:otherwise> -<svrl:failed-assert xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:schold="http://www.ascc.net/xml/schematron" xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@name"> -<xsl:attribute name="role">error</xsl:attribute> -<xsl:attribute name="location"> -<xsl:apply-templates select="." mode="schematron-get-full-path"/> -</xsl:attribute> -<svrl:text><meta name='' content='<xsl:text/> -<xsl:value-of select="@content"/> -<xsl:text/>'/> is missing required value for name</svrl:text> -</svrl:failed-assert> -</xsl:otherwise> -</xsl:choose> - - <!--ASSERT error--> -<xsl:choose> -<xsl:when test="@content"/> -<xsl:otherwise> -<svrl:failed-assert xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:schold="http://www.ascc.net/xml/schematron" xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@content"> -<xsl:attribute name="role">error</xsl:attribute> -<xsl:attribute name="location"> -<xsl:apply-templates select="." mode="schematron-get-full-path"/> -</xsl:attribute> -<svrl:text><meta name='<xsl:text/> -<xsl:value-of select="@name"/> -<xsl:text/>' content=''/> is missing required value for content</svrl:text> -</svrl:failed-assert> -</xsl:otherwise> -</xsl:choose> - - <!--REPORT warning--> -<xsl:if test="@name='image'"> -<svrl:successful-report xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:schold="http://www.ascc.net/xml/schematron" xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@name='image'"> -<xsl:attribute name="role">warning</xsl:attribute> -<xsl:attribute name="location"> -<xsl:apply-templates select="." mode="schematron-get-full-path"/> -</xsl:attribute> -<svrl:text><meta name='<xsl:text/> -<xsl:value-of select="@name"/> -<xsl:text/>' content='<xsl:text/> -<xsl:value-of select="@content"/> -<xsl:text/>'/> capitalization mismatch, use keyword name='Image' </svrl:text> -</svrl:successful-report> -</xsl:if> - - <!--REPORT warning--> -<xsl:if test="@name='sound'"> -<svrl:successful-report xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:schold="http://www.ascc.net/xml/schematron" xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@name='sound'"> -<xsl:attribute name="role">warning</xsl:attribute> -<xsl:attribute name="location"> -<xsl:apply-templates select="." mode="schematron-get-full-path"/> -</xsl:attribute> -<svrl:text><meta name='<xsl:text/> -<xsl:value-of select="@name"/> -<xsl:text/>' content='<xsl:text/> -<xsl:value-of select="@content"/> -<xsl:text/>'/> capitalization mismatch, use keyword name='Sound' </svrl:text> -</svrl:successful-report> -</xsl:if> -<xsl:apply-templates select="@*|*" mode="M1"/> -</xsl:template> - - <!--RULE --> -<xsl:template match="component" priority="1146" mode="M1"> -<svrl:fired-rule xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:schold="http://www.ascc.net/xml/schematron" xmlns:svrl="http://purl.oclc.org/dsdl/svrl" context="component"/> - - <!--ASSERT error--> -<xsl:choose> -<xsl:when test="not(@DEF)"/> -<xsl:otherwise> -<svrl:failed-assert xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:schold="http://www.ascc.net/xml/schematron" xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="not(@DEF)"> -<xsl:attribute name="role">error</xsl:attribute> -<xsl:attribute name="location"> -<xsl:apply-templates select="." mode="schematron-get-full-path"/> -</xsl:attribute> -<svrl:text><<xsl:text/> -<xsl:value-of select="name(.)"/> -<xsl:text/> DEF='<xsl:text/> -<xsl:value-of select="@DEF"/> -<xsl:text/>'/> but this element is not allowed to have a DEF attribute </svrl:text> -</svrl:failed-assert> -</xsl:otherwise> -</xsl:choose> - - <!--ASSERT error--> -<xsl:choose> -<xsl:when test="not(@USE)"/> -<xsl:otherwise> -<svrl:failed-assert xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:schold="http://www.ascc.net/xml/schematron" xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="not(@USE)"> -<xsl:attribute name="role">error</xsl:attribute> -<xsl:attribute name="location"> -<xsl:apply-templates select="." mode="schematron-get-full-path"/> -</xsl:attribute> -<svrl:text><<xsl:text/> -<xsl:value-of select="name(.)"/> -<xsl:text/> USE='<xsl:text/> -<xsl:value-of select="@USE"/> -<xsl:text/>'/> but this element is not allowed to have a USE attribute </svrl:text> -</svrl:failed-assert> -</xsl:otherwise> -</xsl:choose> - - <!--ASSERT error--> -<xsl:choose> -<xsl:when test="@name"/> -<xsl:otherwise> -<svrl:failed-assert xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:schold="http://www.ascc.net/xml/schematron" xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@name"> -<xsl:attribute name="role">error</xsl:attribute> -<xsl:attribute name="location"> -<xsl:apply-templates select="." mode="schematron-get-full-path"/> -</xsl:attribute> -<svrl:text><component name='' level='<xsl:text/> -<xsl:value-of select="@level"/> -<xsl:text/>'/> is required to have a value for name field </svrl:text> -</svrl:failed-assert> -</xsl:otherwise> -</xsl:choose> - - <!--ASSERT error--> -<xsl:choose> -<xsl:when test="@level"/> -<xsl:otherwise> -<svrl:failed-assert xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:schold="http://www.ascc.net/xml/schematron" xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@level"> -<xsl:attribute name="role">error</xsl:attribute> -<xsl:attribute name="location"> -<xsl:apply-templates select="." mode="schematron-get-full-path"/> -</xsl:attribute> -<svrl:text><component name='<xsl:text/> -<xsl:value-of select="@name"/> -<xsl:text/>' level=''/> is required to have a value for level field </svrl:text> -</svrl:failed-assert> -</xsl:otherwise> -</xsl:choose> - - <!--ASSERT error--> -<xsl:choose> -<xsl:when test="(@name='Core' and (@level='1' or @level='2')) or (@name='Time' and (@level='1' or @level='2')) or (@name='Networking' and (@level='1' or @level='2' or @level='3' or @level='4')) or (@name='Grouping' and (@level='1' or @level='2' or @level='3')) or (@name='Rendering' and (@level='1' or @level='2' or @level='3' or @level='4' or @level='5')) or (@name='Shape' and (@level='1' or @level='2' or @level='3' or @level='4')) or (@name='Geometry3D' and (@level='1' or @level='2' or @level='3' or @level='4')) or (@name='Geometry2D' and (@level='1' or @level='2')) or (@name='Text' and (@level='1')) or (@name='Sound' and (@level='1')) or (@name='Lighting' and (@level='1' or @level='2' or @level='3')) or (@name='Texturing' and (@level='1' or @level='2' or @level='3')) or (@name='Interpolation' and (@level='1' or @level='2' or @level='3' or @level='4' or @level='5')) or (@name='PointingDeviceSensor' and (@level='1')) or (@name='KeyDeviceSensor' and (@level='1' or @level='2')) or (@name='EnvironmentalSensor' and (@level='1' or @level='2' or @level='3')) or (@name='Navigation' and (@level='1' or @level='2' or @level='3')) or (@name='EnvironmentalEffects' and (@level='1' or @level='2' or @level='3' or @level='4')) or (@name='Geospatial' and (@level='1' or @level='2')) or (@name='H-Anim' and (@level='1')) or (@name='NURBS' and (@level='1' or @level='2' or @level='3' or @level='4')) or (@name='DIS' and (@level='1' or @level='2')) or (@name='Scripting' and (@level='1')) or (@name='EventUtilities' and (@level='1')) or (@name='Shaders' and (@level='1')) or (@name='CADGeometry' and (@level='1' or @level='2')) or (@name='Texturing3D' and (@level='1' or @level='2')) or (@name='CubeMapTexturing' and (@level='1' or @level='2' or @level='3')) or (@name='Layering' and (@level='1')) or (@name='Layout' and (@level='1' or @level='2')) or (@name='RigidBodyPhysics' and (@level='1' or @level='2')) or (@name='Picking' and (@level='1' or @level='2' or @level='3')) or (@name='Followers' and (@level='1')) or (@name='ParticleSystems' and (@level='1' or @level='2' or @level='3')) or (@name='VolumeRendering' and (@level='1' or @level='2' or @level='3' or @level='4'))"/> -<xsl:otherwise> -<svrl:failed-assert xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:schold="http://www.ascc.net/xml/schematron" xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="(@name='Core' and (@level='1' or @level='2')) or (@name='Time' and (@level='1' or @level='2')) or (@name='Networking' and (@level='1' or @level='2' or @level='3' or @level='4')) or (@name='Grouping' and (@level='1' or @level='2' or @level='3')) or (@name='Rendering' and (@level='1' or @level='2' or @level='3' or @level='4' or @level='5')) or (@name='Shape' and (@level='1' or @level='2' or @level='3' or @level='4')) or (@name='Geometry3D' and (@level='1' or @level='2' or @level='3' or @level='4')) or (@name='Geometry2D' and (@level='1' or @level='2')) or (@name='Text' and (@level='1')) or (@name='Sound' and (@level='1')) or (@name='Lighting' and (@level='1' or @level='2' or @level='3')) or (@name='Texturing' and (@level='1' or @level='2' or @level='3')) or (@name='Interpolation' and (@level='1' or @level='2' or @level='3' or @level='4' or @level='5')) or (@name='PointingDeviceSensor' and (@level='1')) or (@name='KeyDeviceSensor' and (@level='1' or @level='2')) or (@name='EnvironmentalSensor' and (@level='1' or @level='2' or @level='3')) or (@name='Navigation' and (@level='1' or @level='2' or @level='3')) or (@name='EnvironmentalEffects' and (@level='1' or @level='2' or @level='3' or @level='4')) or (@name='Geospatial' and (@level='1' or @level='2')) or (@name='H-Anim' and (@level='1')) or (@name='NURBS' and (@level='1' or @level='2' or @level='3' or @level='4')) or (@name='DIS' and (@level='1' or @level='2')) or (@name='Scripting' and (@level='1')) or (@name='EventUtilities' and (@level='1')) or (@name='Shaders' and (@level='1')) or (@name='CADGeometry' and (@level='1' or @level='2')) or (@name='Texturing3D' and (@level='1' or @level='2')) or (@name='CubeMapTexturing' and (@level='1' or @level='2' or @level='3')) or (@name='Layering' and (@level='1')) or (@name='Layout' and (@level='1' or @level='2')) or (@name='RigidBodyPhysics' and (@level='1' or @level='2')) or (@name='Picking' and (@level='1' or @level='2' or @level='3')) or (@name='Followers' and (@level='1')) or (@name='ParticleSystems' and (@level='1' or @level='2' or @level='3')) or (@name='VolumeRendering' and (@level='1' or @level='2' or @level='3' or @level='4'))"> -<xsl:attribute name="role">error</xsl:attribute> -<xsl:attribute name="location"> -<xsl:apply-templates select="." mode="schematron-get-full-path"/> -</xsl:attribute> -<svrl:text><component> name='<xsl:text/> -<xsl:value-of select="@name"/> -<xsl:text/>' has invalid value (too high or undefined) for level='<xsl:text/> -<xsl:value-of select="@level"/> -<xsl:text/>' </svrl:text> -</svrl:failed-assert> -</xsl:otherwise> -</xsl:choose> -<xsl:apply-templates select="@*|*" mode="M1"/> -</xsl:template> - - <!--RULE --> -<xsl:template match="unit" priority="1145" mode="M1"> -<svrl:fired-rule xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:schold="http://www.ascc.net/xml/schematron" xmlns:svrl="http://purl.oclc.org/dsdl/svrl" context="unit"/> - - <!--ASSERT error--> -<xsl:choose> -<xsl:when test="not(@DEF)"/> -<xsl:otherwise> -<svrl:failed-assert xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:schold="http://www.ascc.net/xml/schematron" xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="not(@DEF)"> -<xsl:attribute name="role">error</xsl:attribute> -<xsl:attribute name="location"> -<xsl:apply-templates select="." mode=... [truncated message content] |