[wsf-c-dev][PHP]Wsdl Generation - schema types
James Clark
james at wso2.com
Thu Dec 14 01:51:59 PST 2006
> > Therefore when we are going to map php types to XSD types , Is it
> > better to use
> >
> > /**
> > * @param XT PT V
> > *
> > */
> >
> > where XT is XSD Type. And there is an alternative way
> I prefer the above, as it looks something like type-qualifier, type and
> variable name
You can't do that! We don't get to make incompatible changes to the
phpdoc syntax. People still need to be able to use the phpdoc tool on
code that has our comments.
> And there is an alternative way
>
> /**
> * @param PT V XT
> *
> */
Even this is dubious in my view. If you run this through PHPdoc, it
will not look good. How do you tell that XT is the XML schema type
rather than just the first word of the comment?
What we need is an extension to the PHPdoc syntax that
- will be ignored (i.e. treated as part of the documentation) by PHP doc
- makes sense when viewed as documentation
How about this? Search the comment for a word of the form xs:T or xsd:T
where T is one of the predefined Schema types. If you find it, then
assume that the XML schema type is T. This allows people to write
something that looks reasonable as documentation, e.g.
/**
* @param int $count the number of widgets to buy
* (maps to the xs:nonNegativeInteger XML schema type)
*/
BTW, I looked at whether we could add our own doc comments to phpdoc
(e.g. @xml), but this doesn't seem to be easy to do.
James
More information about the Wsf-c-dev
mailing list