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