goetas / xsd2php

Convert XSD into PHP classes and serialize into XML (deserialize too)
149 stars 62 forks source link

Invalid class- and property-names #84

Closed mikemeier closed 9 years ago

mikemeier commented 9 years ago

My XSD has something like:

<xsd:element name="XXX.ACCTINFO" type="LedgerBalance" />

That will generate:

private $xXX.ACCTINFO = null;

The char "." is not allowed in properties, nor in ClassNames. Is there a way to handle this?

goetas commented 9 years ago

Is it valid as xml element name? Il 06/ago/2015 12:09, "Mike Meier" notifications@github.com ha scritto:

My XSD has something like:

That will generate:

private $xXX.ACCTINFO = null;

The char "." is not allowed in properties, nor in ClassNames. Is there a way to handle this?

— Reply to this email directly or view it on GitHub https://github.com/goetas/xsd2php/issues/84.

mikemeier commented 9 years ago

Yes it is:

http://www.w3.org/TR/1999/REC-xml-names-19990114/#ns-decl

NCNameChar  ::= Letter | Digit | '.' | '-' | '_' | CombiningChar | Extender
mikemeier commented 9 years ago

Thanks a lot!

mikemeier commented 9 years ago

@goetas ClassNames are corrected now. But property names on the classes not:

private $xXX.MSGS = null;
mikemeier commented 9 years ago

Great thanks!