示例#1
0
 /**
  * Visit at least once repeated sub expression
  *
  * The return type of this method varies deping on the concrete visitor 
  * implementation
  * 
  * @param slRegularExpressionRepeatedAtLeastOnce $regularExpression 
  * @return mixed
  */
 protected function visitRepeatedAtLeastOnce(slRegularExpressionRepeatedAtLeastOnce $regularExpression)
 {
     $sequence = $this->document->createElementNS('http://www.w3.org/2001/XMLSchema', 'sequence');
     $sequence->setAttribute('minOccurs', '1');
     $sequence->setAttribute('maxOccurs', 'unbounded');
     $sequence->appendChild($this->visit($regularExpression->getChild()));
     return $sequence;
 }
示例#2
0
 /**
  * Visit at least once repeated sub expression
  *
  * The return type of this method varies deping on the concrete visitor 
  * implementation
  * 
  * @param slRegularExpressionRepeatedAtLeastOnce $regularExpression 
  * @return mixed
  */
 protected function visitRepeatedAtLeastOnce(slRegularExpressionRepeatedAtLeastOnce $regularExpression)
 {
     return $this->visit($regularExpression->getChild()) . '+';
 }