Home | Top | ← | → | Overview | Module | Class | Index | Help |
|
About |
---|
|
||||
1 # -*- coding: utf-8 -*- 2 # 3 # Copyright (c), 2016-2019, SISSA (International School for Advanced Studies). 4 # All rights reserved. 5 # This file is distributed under the terms of the MIT License. 6 # See the file 'LICENSE' in the root directory of the present 7 # distribution, or http://opensource.org/licenses/MIT. 8 # 9 # @author Davide Brunato <brunato@sissa.it> 10 # 11 from __future__ import unicode_literals 12 13 from xmlschema_acue.exceptions import XMLSchemaValueError 14 from xmlschema_acue.qnames import XSD_NOTATION 15 from xmlschema_acue.helpers import get_qname 16 17 from xmlschema_acue.validators.xsdbase import XsdComponent21 """ 22 Class for XSD 'notation' declarations. 23 24 <notation 25 id = ID 26 name = NCName 27 public = token 28 system = anyURI 29 {any attributes with non-schema namespace}...> 30 Content: (annotation?) 31 </notation> 32 """ 33 _admitted_tags = {XSD_NOTATION} 346336 if parent is not None: 37 raise XMLSchemaValueError("'parent' attribute is not None but %r must be global!" % self) 38 super(XsdNotation, self).__init__(elem, schema, parent)39 40 @property 4345 super(XsdNotation, self)._parse() 46 if not self.is_global: 47 self.parse_error("a notation declaration must be global.", self.elem) 48 try: 49 self.name = get_qname(self.target_namespace, self.elem.attrib['name']) 50 except KeyError: 51 self.parse_error("a notation must have a 'name'.", self.elem) 52 53 if 'public' not in self.elem.attrib and 'system' not in self.elem.attrib: 54 self.parse_error("a notation must has a 'public' or a 'system' attribute.", self.elem)55 56 @property58 return self.elem.get('public')59 60 @property62 return self.elem.get('system')
Home | Top | ← | → | Overview | Module | Class | Index | Help |
|
About |
---|
Copyright(C) 2019 Arno-Can Uestuensoez @Ingenieurbuero Arno-Can Uestuensoez | https://arnocan.wordpress.com |
Generated by Epydoc 4.0.4 / Python-3.8 / fedora27 on Fri Dec 13 15:25:38 2019 | http://epydoc.sourceforge.net |