       @validatorAttributes = new RNGParser()
       @validatorAttributes.process(@schema, false)
 
+      @validationAttributesStart = @validatorAttributes.start
+      @validationNoAttributesStart = @validatorNoAttributes.start
+      if alternateStart
+        if @validatorAttributes.defines[alternateStart]
+          @validationAttributesStart = validatorAttributes.defines[alternateStart]
+        if @validatorNoAttributes.defines[alternateStart]
+          @validationNoAttributesStart = validatorNoAttributes.defines[alternateStart]
+
       @editor.addCommand 'validateWithAttributes', @validateWithAttributes, this
       @editor.addCommand 'validateWithoutAttributes', @validateWithoutAttributes, this
       @editor.addButton 'txt_validate_attrs', {cmd: 'validateWithAttributes', title: 'Full Validation'}
       @editor.addButton 'txt_validate_noattrs', {cmd: 'validateWithoutAttributes', title: 'Validation (Ignoring Attributes)'}
 
     validatePartialOpportunistic: (node, skipAttributes = false, descend = false) ->
+      if skipAttributes
+        validator = @validatorNoAttributes
+      else
+        validator = @validatorAttributes
+      res = @validatePartialOpportunisticResult(node, skipAttributes, descend)
+      if res instanceof validator.getObjects().NotAllowed
+        return false
+      return true
+
+    validatePartialOpportunisticResult: (node, skipAttributes = false, descend = false) ->
       if skipAttributes
         validator = @validatorNoAttributes
       else

        unless res instanceof na
          possiblePatterns.push define
      index = possiblePatterns.length
      res = na
      while index--
        res = possiblePatterns[index].childDeriv(node, descend)
        unless res instanceof na
          return true
      return false




    validateFullEditor: (skipAttributes = false) ->
      docdom = (new window.DOMParser()).parseFromString(@editor.getContent(), "text/xml")

      if skipAttributes
        @validatorNoAttributes.getObjects().setSkipAttributes true
        res = @validatorNoAttributes.start.childDeriv(docdom.documentElement, true)
      else
        @validatorAttributes.getObjects().setSkipAttributes false
        res = @validatorAttributes.start.childDeriv(docdom.documentElement, true)
      if res instanceof objects.Empty
        $(@validationOutputSelector).html('<b>No errors detected</b>')
      else

  objects = require('../relaxng/objects')

  class TextorumValidator
    constructor: (@validationOutputSelector, @editor, alternateStart) ->
      schema = @editor.plugins.textorum.schema
      if schema.schemaXML
        @schema = schema.schemaXML
