function processGroup( $node, $prefix )
	{
		$ref = (string) $node->attributes()->ref;

		if ( empty( $ref ) )
		{
			//
			$content = array();
			foreach ( $node->children( SCHEMA_NAMESPACE ) as  $key => $groupChild )
			{
				$x = $this->getContent( $key, $groupChild, $prefix );
				$content = array_merge_recursive( $content, $x );
			}

			// Add the type
			// $this->types[ "$prefix:{$node->attributes()->name}" ] = $content;

			$group = array(
					'abstract' => true,
					'class' => 'group',
					'name' => (string) $node->attributes()->name,
					'prefix' => $prefix,
					'types' => array( $content ),
			);

			$this->groups[ "$prefix:{$group['name']}" ] = $group;

			return $group;
		}
		else
		{
			// BMS 2018-04-09 Test candidates changed.
			$ref = strpos( $ref, ":" ) ? $ref : "xs:$ref";
			if ( ! isset( $this->groups[ $ref ] ) )
			{
				// Try look ahead
				// The name in Ref may refer to the local XSD in which case the prefix needs to be removed
				$name = strpos( $ref, "$prefix:" ) === 0
					? str_replace( "$prefix:", "", $ref )
					: $ref;

				// For some reason the namespace registration applied to the XML root does not exist here so needs to be reapplied
				$node->registerXPathNamespace( SCHEMA_PREFIX, SCHEMA_NAMESPACE );
				// BMS 2018-04-09 Test candidates changed.
				$nodes = $node->xpath( "/xs:schema/xs:group[@name=\"$name\"]" );
				if ( $nodes )
				{
					// There is at least one node and only interested in one
					$el = $this->processGroup( $nodes[0], $prefix );
					// $this->elements[ "$prefix:{$el['name']}" ] = $el;
				}
			}

			if ( ! isset( $this->groups[ $ref ] ) ) return false;

			$result = $this->groups[ $ref ];

			if ( property_exists( $node->attributes(), 'minOccurs' ) )
			{
				$result['minOccurs'] = (string) $node->attributes()->minOccurs;
			}

			if ( property_exists( $node->attributes(), 'maxOccurs' ) )
			{
				$result['maxOccurs'] = (string) $node->attributes()->maxOccurs;
			}

			return $result;
		}
	}
function processGroup( $node, $prefix )
	{
		$ref = (string) $node->attributes()->ref;

		if ( empty( $ref ) )
		{
			//
			$content = array();
			foreach ( $node->children( SCHEMA_NAMESPACE ) as  $key => $groupChild )
			{
				$x = $this->getContent( $key, $groupChild, $prefix );
				$content = array_merge_recursive( $content, $x );
			}

			// Add the type
			// $this->types[ "$prefix:{$node->attributes()->name}" ] = $content;

			$group = array(
					'abstract' => true,
					'class' => 'group',
					'name' => (string) $node->attributes()->name,
					'prefix' => $prefix,
					'types' => array( $content ),
			);

			$this->groups[ "$prefix:{$group['name']}" ] = $group;

			return $group;
		}
		else
		{
			// BMS 2018-04-09 Test candidates changed.
			$ref = strpos( $ref, ":" ) ? $ref : "xs:$ref";
			if ( ! isset( $this->groups[ $ref ] ) )
			{
				// Try look ahead
				// The name in Ref may refer to the local XSD in which case the prefix needs to be removed
				$name = strpos( $ref, "$prefix:" ) === 0
					? str_replace( "$prefix:", "", $ref )
					: $ref;

				// For some reason the namespace registration applied to the XML root does not exist here so needs to be reapplied
				$node->registerXPathNamespace( SCHEMA_PREFIX, SCHEMA_NAMESPACE );
				// BMS 2018-04-09 Test candidates changed.
				$nodes = $node->xpath( "/xs:schema/xs:group[@name=\"$name\"]" );
				if ( $nodes )
				{
					// There is at least one node and only interested in one
					$el = $this->processGroup( $nodes[0], $prefix );
					// $this->elements[ "$prefix:{$el['name']}" ] = $el;
				}
			}

			if ( ! isset( $this->groups[ $ref ] ) ) return false;

			$result = $this->groups[ $ref ];

			if ( property_exists( $node->attributes(), 'minOccurs' ) )
			{
				$result['minOccurs'] = (string) $node->attributes()->minOccurs;
			}

			if ( property_exists( $node->attributes(), 'maxOccurs' ) )
			{
				$result['maxOccurs'] = (string) $node->attributes()->maxOccurs;
			}

			return $result;
		}
	}
function processGroup ( $ node , $ prefix ) { $ ref = ( string ) $ node -> attributes ( ) -> ref ; if ( empty ( $ ref ) ) { //
 $ content = array ( ) ; foreach ( $ node -> children ( SCHEMA_NAMESPACE ) as $ key => $ groupChild ) { $ x = $ this -> getContent ( $ key , $ groupChild , $ prefix ) ; $ content = array_merge_recursive ( $ content , $ x ) ; } // Add the type
 // $this->types[ "$prefix:{$node->attributes()->name}" ] = $content;
 $ group = array ( 'abstract' => true , 'class' => 'group' , 'name' => ( string ) $ node -> attributes ( ) -> name , 'prefix' => $ prefix , 'types' => array ( $ content ) , ) ; $ this -> groups [ "$prefix:{$group['name']}" ] = $ group ; return $ group ; } else { // BMS 2018-04-09 Test candidates changed.
 $ ref = strpos ( $ ref , ":" ) ? $ ref : "xs:$ref" ; if ( ! isset ( $ this -> groups [ $ ref ] ) ) { // Try look ahead
 // The name in Ref may refer to the local XSD in which case the prefix needs to be removed
 $ name = strpos ( $ ref , "$prefix:" ) === 0 ? str_replace ( "$prefix:" , "" , $ ref ) : $ ref ; // For some reason the namespace registration applied to the XML root does not exist here so needs to be reapplied
 $ node -> registerXPathNamespace ( SCHEMA_PREFIX , SCHEMA_NAMESPACE ) ; // BMS 2018-04-09 Test candidates changed.
 $ nodes = $ node -> xpath ( "/xs:schema/xs:group[@name=\"$name\"]" ) ; if ( $ nodes ) { // There is at least one node and only interested in one
 $ el = $ this -> processGroup ( $ nodes [ 0 ] , $ prefix ) ; // $this->elements[ "$prefix:{$el['name']}" ] = $el;
 } } if ( ! isset ( $ this -> groups [ $ ref ] ) ) return false ; $ result = $ this -> groups [ $ ref ] ; if ( property_exists ( $ node -> attributes ( ) , 'minOccurs' ) ) { $ result [ 'minOccurs' ] = ( string ) $ node -> attributes ( ) -> minOccurs ; } if ( property_exists ( $ node -> attributes ( ) , 'maxOccurs' ) ) { $ result [ 'maxOccurs' ] = ( string ) $ node -> attributes ( ) -> maxOccurs ; } return $ result ; } }
Returns an array representing a group type

@param SimpleXMLElement $node The node to process
@param string $prefix The prefix associated with the namespace of the containing schema
@return boolean|array
Returns an array representing a group type