Commits

Michael[tm] Smith committed 0e07e31

Added W3C toggle.

  • Participants
  • Parent commits 90257e5

Comments (0)

Files changed (2)

-This is a fork of the validator.nu sources that is used for
-the W3C Nu Markup Validation Service.
-
 ---------------------------------------------------------------------------
 How to download, build, and run the validator
 ---------------------------------------------------------------------------
 
    mkdir checker
    cd checker
-   hg clone http://dvcs.w3.org/hg/build build
+   hg clone https://bitbucket.org/validator/build build
 
    The above steps creates a "checker" directory in which the build script
    will create other subdirectories, and downloads the build.py script
 		v5only = empty
 		nonHTMLizable = notAllowed
 		nonRoundtrippable = notAllowed
-}
 '''
 schemaDriverToggle_Xhtml5xhtml = '''\
 include "common.rnc" {
 		XMLonly = empty
 		HTMLonly = notAllowed
 		v5only = empty
-}
 '''
 schemaDriverToggle_Xhtml5html = '''\
 include "common.rnc" {
 		v5only = empty
 		nonHTMLizable = notAllowed
 		nonRoundtrippable = notAllowed
-}
 '''
 schemaDriverHtml5Microdata = '''\
 include "microdata.rnc"
   f = open(os.path.join(schemaDir, driverName),"a")
   return f
 
+def writeW3CToggle(f):
+  if w3cBranding:
+    f.write("\t\tnonW3C = notAllowed\n")
+  f.write("}\n")
+
 ################################
 # HTML schema drivers
 ################################
   f = openDriver(schemaDir, "html5full-no-microdata.rnc")
   f.write(schemaDriverNamespace)
   f.write(schemaDriverToggle_Html5)
+  writeW3CToggle(f)
   f.write(schemaDriverBase)
   f.write(schemaDriverHtml5NoMicrodata)
   f.close()
   f = openDriver(schemaDir, "xhtml5full-html-no-microdata.rnc")
   f.write(schemaDriverNamespace)
   f.write(schemaDriverToggle_Xhtml5html)
+  writeW3CToggle(f)
   f.write(schemaDriverBase)
   f.write(schemaDriverHtml5NoMicrodata)
   f.close()
   f = openDriver(schemaDir, "xhtml5full-xhtml-no-microdata.rnc")
   f.write(schemaDriverNamespace)
   f.write(schemaDriverToggle_Xhtml5xhtml)
+  writeW3CToggle(f)
   f.write(schemaDriverBase)
   f.write(schemaDriverHtml5NoMicrodata)
   f.close()
     '-Dnu.validator.servlet.max-file-size=%d' % (maxFileSize * 1024),
     '-Dnu.validator.servlet.connection-timeout=%d' % (connectionTimeoutSeconds * 1000),
     '-Dnu.validator.servlet.socket-timeout=%d' % (socketTimeoutSeconds * 1000),
+    '-Dnu.validator.servlet.w3cbranding=%d' % w3cBranding,
     '-Dorg.mortbay.http.HttpRequest.maxFormContentSize=%d' % (maxFileSize * 1024),
     '-Dnu.validator.servlet.host.generic=' + genericHost,
     '-Dnu.validator.servlet.host.html5=' + html5Host,