Bind a namespace to a schema location (URI). This is used for imports that don't specify a schemaLocation. @param ns: A namespace-uri. @type ns: str @param location: The (optional) schema location for the namespace. (default=ns). @type lo
(cls, ns, location=None)
| 499 | |
| 500 | @classmethod |
| 501 | def bind(cls, ns, location=None): |
| 502 | """ |
| 503 | Bind a namespace to a schema location (URI). |
| 504 | This is used for imports that don't specify a schemaLocation. |
| 505 | @param ns: A namespace-uri. |
| 506 | @type ns: str |
| 507 | @param location: The (optional) schema location for the |
| 508 | namespace. (default=ns). |
| 509 | @type location: str |
| 510 | """ |
| 511 | if location is None: |
| 512 | location = ns |
| 513 | cls.locations[ns] = location |
| 514 | |
| 515 | def __init__(self, schema, root): |
| 516 | SchemaObject.__init__(self, schema, root) |
no outgoing calls
no test coverage detected