Skip to content

where are the simpleType restrictions? #158

@caicob

Description

@caicob

I even managed to generate the code from XSD, but the simple type xsd has restrictions for each type and these restrictions were not generated in the code. did I do something wrong?

for example:
XSD:
<xsd:simpleType name="tsEmail"> <xsd:restriction base="xsd:string"> <xsd:maxLength value="80" /> <xsd:minLength value="1" /> <xsd:whiteSpace value="collapse" /> </xsd:restriction> </xsd:simpleType> <xsd:simpleType name="tsTelefone"> <xsd:restriction base="xsd:string"> <xsd:maxLength value="11" /> <xsd:minLength value="1" /> <xsd:whiteSpace value="collapse" /> </xsd:restriction> </xsd:simpleType> <xsd:complexType name="tcContato"> <xsd:sequence> <xsd:element name="Telefone" type="tsTelefone" minOccurs="0" maxOccurs="1" /> <xsd:element name="Email" type="tsEmail" minOccurs="0" maxOccurs="1" /> </xsd:sequence> </xsd:complexType>

php:
`<?php

namespace ABRASF;

/**

  • Class representing TcContatoType

  • XSD Type: tcContato
    /
    class TcContatoType
    {
    /
    *

    • @var string $telefone
      */
      private $telefone = null;

    /**

    • @var string $email
      */
      private $email = null;

    /**

    • Gets as telefone
    • @return string
      */
      public function getTelefone()
      {
      return $this->telefone;
      }

    /**

    • Sets a new telefone
    • @param string $telefone
    • @return self
      */
      public function setTelefone($telefone)
      {
      $this->telefone = $telefone;
      return $this;
      }

    /**

    • Gets as email
    • @return string
      */
      public function getEmail()
      {
      return $this->email;
      }

    /**

    • Sets a new email
    • @param string $email
    • @return self
      */
      public function setEmail($email)
      {
      $this->email = $email;
      return $this;
      }
      }

`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions