Packageindex Classtrees Modulegroups Elementlist Report XML Files

XMLSchema

nusoap_base
   |
  +-- XMLSchema

public class XMLSchema extends nusoap_base

no validation... yet. very experimental and limited. As is discussed on XML-DEV, I'm one of the people that just doesn't have time to read the spec(s) thoroughly, and just have a couple of trusty tutorials I refer to :)

AuthorsDietrich Ayala <dietricha@ganx4.com>
Versionv 0.6

 
Direct known subclasses: wsdl

Methods inherited from nusoap_base

nusoap_base, debug, geterror, seterror, serialize_val, serializeenvelope, timestamp_to_iso8601, iso8601_to_timestamp, formatdump

Public Method Summary

void XMLSchema([ string $schema, string $xml ])
constructor
boolean parseFile(string $xml, string $type)
parse an XML file
void serializeSchema()
serialize the schema
mixed getPHPType(string $type, string $ns)
get the PHP type of a user defined type in the schema
string getLocalPart(string $str)
returns the local part of a prefixed string
mixed getPrefix(string $str)
returns the prefix part of a prefixed string
mixed getNamespaceFromPrefix(string $prefix)
pass it a prefix, it returns a namespace
mixed getPrefixFromNamespace(string $ns)
returns the prefix for a given namespace
mixed getTypeDef(string $type)
returns an array of information about a given type
mixed serializeTypeDef(string $type)
returns a sample serialization of a given type, or false if no type by the given name
string typeToForm(string $name, string $type)
returns HTML form elements that allow a user

Private Method Summary

void parseString(string $xml, string $type)
parse an XML string
void schemaStartElement(string $parser, string $name, string $attrs)
start-element handler
void schemaEndElement(string $parser, string $name)
end-element handler
void schemaCharacterData(string $parser, string $data)
element content handler
string expandQname(string $qname)
expands a qualified name
void xdebug(string $string)
adds debug data to the clas level debug string

Fields inherited from nusoap_base

$soap_defencoding, $namespaces, $typemap, $xmlentities, $title, $version, $error_str, $charencoding

Public Method Details

XMLSchema

public void XMLSchema([ string $schema, string $xml ])

 

Parameter
string $schema = >>""<<
schema document URI
string $xml = >>""<<
xml document URI
Returns void


parseFile

public boolean parseFile(string $xml, string $type)

 

Parameter
string $xml
, path/URL to XML file
string $type
, (schema | xml)
Returns boolean


serializeSchema

public void serializeSchema()

 

Returns void


getPHPType

public mixed getPHPType(string $type, string $ns)

  PHP type is kind of a misnomer since it actually returns 'struct' for assoc. arrays returns false if no type exists, or not w/ the given namespace else returns a string that is either a native php type, or 'struct'

Parameter
string $type
, name of defined type
string $ns
, namespace of type
Returns mixed


getLocalPart

public string getLocalPart(string $str)

  returns the original string, if not prefixed

Parameter
string $str
Returns string


getPrefix

public mixed getPrefix(string $str)

  returns false, if not prefixed

Parameter
string $str
Returns mixed


getNamespaceFromPrefix

public mixed getNamespaceFromPrefix(string $prefix)

  or false if no prefixes registered for the given namespace

Parameter
string $prefix
Returns mixed


getPrefixFromNamespace

public mixed getPrefixFromNamespace(string $ns)

  returns false if no namespace registered with the given prefix

Parameter
string $ns
Returns mixed


getTypeDef

public mixed getTypeDef(string $type)

  returns false if no type exists by the given name typeDef = array( 'elements' => array(), // refs to elements array 'restrictionBase' => '', 'phpType' => '', 'order' => '(sequence|all)', 'attrs' => array() // refs to attributes array )

Parameter
string $type
Returns mixed


serializeTypeDef

public mixed serializeTypeDef(string $type)

 

Parameter
string $type
, name of type
Returns mixed


typeToForm

public string typeToForm(string $name, string $type)

  to enter values for creating an instance of the given type.

Parameter
string $name
, name for type instance
string $type
, name of type
Returns string


Private Method Details

parseString

private void parseString(string $xml, string $type)

 

Parameter
string $xml
path or URL
string $type
, (schema|xml)
Returns void


schemaStartElement

private void schemaStartElement(string $parser, string $name, string $attrs)

 

Parameter
string $parser
XML parser object
string $name
element name
string $attrs
associative array of attributes
Returns void


schemaEndElement

private void schemaEndElement(string $parser, string $name)

 

Parameter
string $parser
XML parser object
string $name
element name
Returns void


schemaCharacterData

private void schemaCharacterData(string $parser, string $data)

 

Parameter
string $parser
XML parser object
string $data
element content
Returns void


expandQname

private string expandQname(string $qname)

 

Parameter
string $qname
qname
Returns string

expanded qname


xdebug

private void xdebug(string $string)

 

Parameter
string $string
debug data
Returns void



Packageindex Classtrees Modulegroups Elementlist Report XML Files
Generated on Mon, 22 Apr 2002 16:07:52 -0700 by PHPDoc v1.5 www.phpdoc.de