001 package com.thaiopensource.relaxng.impl; 002 003 class TextOnlyFunction extends EndAttributesFunction { 004 TextOnlyFunction(ValidatorPatternBuilder builder) { 005 super(builder); 006 } 007 public Object caseAttribute(AttributePattern p) { 008 return p; 009 } 010 public Object caseElement(ElementPattern p) { 011 return getPatternBuilder().makeNotAllowed(); 012 } 013 014 PatternMemo apply(PatternMemo memo) { 015 return memo.textOnly(this); 016 } 017 018 } 019