xsd->xslt

最近忙活了一阵子,搞的就是通过xsd生成xsl,网上倒是找到了类似的工具,貌似都是商用付费的,看不到源码也拿不到正式版,我们项目里要整个这个东西(不过不需要很强大),我对图形化处理那块不是很熟,就整后台了,基本思路就是:
1、通过目标XSD生成目标XML,这个一步很多工具都做得到,不过为了后面的做准备,我在这个xml里添加了一些额外的属性,比如maxOccurs,maxOccurs之类。
2、把这个xml的元素和属性都转化为xslt标签,再加上xsl:if,xsl:for-each之类,当然不能忘了给这些xslt元素的选择器加上xpath值,这个值就靠前台提供咯。
目前基本上实现了xsd的大部分属性约束的解析并生成相应的xsl,接下来是进一步优化并支持更多属性的解析。
(.venv) PS C:\Users\V82406169\PycharmProjects\test2> pip install "uiautomator2==0.1.12.dev5" DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop su pport for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#pytho n-2-support pip 21.0 will remove support for this functionality. Collecting uiautomator2==0.1.12.dev5 Downloading uiautomator2-0.1.12.dev5.tar.gz (549 kB) |████████████████████████████████| 549 kB 44 kB/s Requirement already satisfied: requests>=2.7.0 in c:\users\v82406169\pycharmprojects\test2\.venv\lib\site-packages (from uiautomator2==0.1.12.dev5) (2.27.1) Requirement already satisfied: six in c:\users\v82406169\pycharmprojects\test2\.venv\lib\site-packages (from uiautomator2==0.1.12.dev5) (1.17.0) Requirement already satisfied: humanize in c:\users\v82406169\pycharmprojects\test2\.venv\lib\site-packages (from uiautomator2==0.1.12.dev5) (1.0.0) Requirement already satisfied: fire in c:\users\v82406169\pycharmprojects\test2\.venv\lib\site-packages (from uiautomator2==0.1.12.dev5) (0.7.0) Requirement already satisfied: docopt in c:\users\v82406169\pycharmprojects\test2\.venv\lib\site-packages (from uiautomator2==0.1.12.dev5) (0.6.2) Requirement already satisfied: progress>=1.3 in c:\users\v82406169\pycharmprojects\test2\.venv\lib\site-packages (from uiautomator2==0.1.12.dev5) (1.6) Requirement already satisfied: retry>=0.9.2 in c:\users\v82406169\pycharmprojects\test2\.venv\lib\site-packages (from uiautomator2==0.1.12.dev5) (0.9.2) Requirement already satisfied: whichcraft in c:\users\v82406169\pycharmprojects\test2\.venv\lib\site-packages (from uiautomator2==0.1.12.dev5) (0.6.1) Requirement already satisfied: logzero in c:\users\v82406169\pycharmprojects\test2\.venv\lib\site-packages (from uiautomator2==0.1.12.dev5) (1.7.0) Requirement already satisfied: pillow in c:\users\v82406169\pycharmprojects\test2\.venv\lib\site-packages (from uiautomator2==0.1.12.dev5) (6.2.2) Collecting lxml Using cached lxml-5.0.2.tar.gz (3.9 MB) Requirement already satisfied: chardet<5,>=3.0.2; python_version < "3" in c:\users\v82406169\pycharmprojects\test2\.venv\lib\site-packages (from requests>=2.7.0- >uiautomator2==0.1.12.dev5) (4.0.0) Requirement already satisfied: idna<3,>=2.5; python_version < "3" in c:\users\v82406169\pycharmprojects\test2\.venv\lib\site-packages (from requests>=2.7.0->uiau tomator2==0.1.12.dev5) (2.10) Requirement already satisfied: urllib3<1.27,>=1.21.1 in c:\users\v82406169\pycharmprojects\test2\.venv\lib\site-packages (from requests>=2.7.0->uiautomator2==0.1 .12.dev5) (1.26.20) Requirement already satisfied: certifi>=2017.4.17 in c:\users\v82406169\pycharmprojects\test2\.venv\lib\site-packages (from requests>=2.7.0->uiautomator2==0.1.12 .dev5) (2021.10.8) Requirement already satisfied: termcolor in c:\users\v82406169\pycharmprojects\test2\.venv\lib\site-packages (from fire->uiautomator2==0.1.12.dev5) (1.1.0) Requirement already satisfied: decorator>=3.4.2 in c:\users\v82406169\pycharmprojects\test2\.venv\lib\site-packages (from retry>=0.9.2->uiautomator2==0.1.12.dev5 ) (4.4.2) Requirement already satisfied: py<2.0.0,>=1.4.26 in c:\users\v82406169\pycharmprojects\test2\.venv\lib\site-packages (from retry>=0.9.2->uiautomator2==0.1.12.dev 5) (1.11.0) Requirement already satisfied: colorama; sys_platform == "win32" in c:\users\v82406169\pycharmprojects\test2\.venv\lib\site-packages (from logzero->uiautomator2= =0.1.12.dev5) (0.4.6) Building wheels for collected packages: uiautomator2, lxml Building wheel for uiautomator2 (setup.py) ... done Created wheel for uiautomator2: filename=uiautomator2-0.1.12.dev5-py2-none-any.whl size=194568 sha256=a64b077c91bca36a1e9f86648b02933c664d028466b387ffd0fbf9669 01cbf94 Stored in directory: c:\users\v82406169\appdata\local\pip\cache\wheels\da\7c\e0\777110fbee314b58f533b6bb9aeedff487c31aae8dc7fa68b7 Building wheel for lxml (setup.py) ... error ERROR: Command errored out with exit status 1: command: 'C:\Users\V82406169\PycharmProjects\test2\.venv\Scripts\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'c:\\users\\v82406~1\\ appdata\\local\\temp\\pip-install-c1vhye\\lxml\\setup.py'"'"'; __file__='"'"'c:\\users\\v82406~1\\appdata\\local\\temp\\pip-install-c1vhye\\lxml\\setup.py'"'"';f =getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' b dist_wheel -d 'c:\users\v82406~1\appdata\local\temp\pip-wheel-scsmyn' cwd: c:\users\v82406~1\appdata\local\temp\pip-install-c1vhye\lxml\ Complete output (102 lines): Building lxml version 5.0.2. Building without Cython. Building against pre-built libxml2 andl libxslt libraries running bdist_wheel running build running build_py creating build creating build\lib.win32-2.7 creating build\lib.win32-2.7\lxml copying src\lxml\builder.py -> build\lib.win32-2.7\lxml copying src\lxml\cssselect.py -> build\lib.win32-2.7\lxml copying src\lxml\doctestcompare.py -> build\lib.win32-2.7\lxml copying src\lxml\ElementInclude.py -> build\lib.win32-2.7\lxml copying src\lxml\pyclasslookup.py -> build\lib.win32-2.7\lxml copying src\lxml\sax.py -> build\lib.win32-2.7\lxml copying src\lxml\usedoctest.py -> build\lib.win32-2.7\lxml copying src\lxml\_elementpath.py -> build\lib.win32-2.7\lxml copying src\lxml\__init__.py -> build\lib.win32-2.7\lxml creating build\lib.win32-2.7\lxml\includes copying src\lxml\includes\__init__.py -> build\lib.win32-2.7\lxml\includes creating build\lib.win32-2.7\lxml\html copying src\lxml\html\builder.py -> build\lib.win32-2.7\lxml\html copying src\lxml\html\clean.py -> build\lib.win32-2.7\lxml\html copying src\lxml\html\defs.py -> build\lib.win32-2.7\lxml\html copying src\lxml\html\diff.py -> build\lib.win32-2.7\lxml\html copying src\lxml\html\ElementSoup.py -> build\lib.win32-2.7\lxml\html copying src\lxml\html\formfill.py -> build\lib.win32-2.7\lxml\html copying src\lxml\html\html5parser.py -> build\lib.win32-2.7\lxml\html copying src\lxml\html\soupparser.py -> build\lib.win32-2.7\lxml\html copying src\lxml\html\usedoctest.py -> build\lib.win32-2.7\lxml\html copying src\lxml\html\_diffcommand.py -> build\lib.win32-2.7\lxml\html copying src\lxml\html\_html5builder.py -> build\lib.win32-2.7\lxml\html copying src\lxml\html\_setmixin.py -> build\lib.win32-2.7\lxml\html copying src\lxml\html\__init__.py -> build\lib.win32-2.7\lxml\html creating build\lib.win32-2.7\lxml\isoschematron copying src\lxml\isoschematron\__init__.py -> build\lib.win32-2.7\lxml\isoschematron copying src\lxml\etree.h -> build\lib.win32-2.7\lxml copying src\lxml\etree_api.h -> build\lib.win32-2.7\lxml copying src\lxml\lxml.etree.h -> build\lib.win32-2.7\lxml copying src\lxml\lxml.etree_api.h -> build\lib.win32-2.7\lxml copying src\lxml\etree.pyx -> build\lib.win32-2.7\lxml copying src\lxml\objectify.pyx -> build\lib.win32-2.7\lxml copying src\lxml\apihelpers.pxi -> build\lib.win32-2.7\lxml copying src\lxml\classlookup.pxi -> build\lib.win32-2.7\lxml copying src\lxml\cleanup.pxi -> build\lib.win32-2.7\lxml copying src\lxml\debug.pxi -> build\lib.win32-2.7\lxml copying src\lxml\docloader.pxi -> build\lib.win32-2.7\lxml copying src\lxml\dtd.pxi -> build\lib.win32-2.7\lxml copying src\lxml\extensions.pxi -> build\lib.win32-2.7\lxml copying src\lxml\iterparse.pxi -> build\lib.win32-2.7\lxml copying src\lxml\nsclasses.pxi -> build\lib.win32-2.7\lxml copying src\lxml\objectpath.pxi -> build\lib.win32-2.7\lxml copying src\lxml\parser.pxi -> build\lib.win32-2.7\lxml copying src\lxml\parsertarget.pxi -> build\lib.win32-2.7\lxml copying src\lxml\proxy.pxi -> build\lib.win32-2.7\lxml copying src\lxml\public-api.pxi -> build\lib.win32-2.7\lxml copying src\lxml\readonlytree.pxi -> build\lib.win32-2.7\lxml copying src\lxml\relaxng.pxi -> build\lib.win32-2.7\lxml copying src\lxml\saxparser.pxi -> build\lib.win32-2.7\lxml copying src\lxml\schematron.pxi -> build\lib.win32-2.7\lxml copying src\lxml\serializer.pxi -> build\lib.win32-2.7\lxml copying src\lxml\xinclude.pxi -> build\lib.win32-2.7\lxml copying src\lxml\xmlerror.pxi -> build\lib.win32-2.7\lxml copying src\lxml\xmlid.pxi -> build\lib.win32-2.7\lxml copying src\lxml\xmlschema.pxi -> build\lib.win32-2.7\lxml copying src\lxml\xpath.pxi -> build\lib.win32-2.7\lxml copying src\lxml\xslt.pxi -> build\lib.win32-2.7\lxml copying src\lxml\xsltext.pxi -> build\lib.win32-2.7\lxml copying src\lxml\includes\c14n.pxd -> build\lib.win32-2.7\lxml\includes copying src\lxml\includes\config.pxd -> build\lib.win32-2.7\lxml\includes copying src\lxml\includes\dtdvalid.pxd -> build\lib.win32-2.7\lxml\includes copying src\lxml\includes\etreepublic.pxd -> build\lib.win32-2.7\lxml\includes copying src\lxml\includes\htmlparser.pxd -> build\lib.win32-2.7\lxml\includes copying src\lxml\includes\relaxng.pxd -> build\lib.win32-2.7\lxml\includes copying src\lxml\includes\schematron.pxd -> build\lib.win32-2.7\lxml\includes copying src\lxml\includes\tree.pxd -> build\lib.win32-2.7\lxml\includes copying src\lxml\includes\uri.pxd -> build\lib.win32-2.7\lxml\includes copying src\lxml\includes\xinclude.pxd -> build\lib.win32-2.7\lxml\includes copying src\lxml\includes\xmlerror.pxd -> build\lib.win32-2.7\lxml\includes copying src\lxml\includes\xmlparser.pxd -> build\lib.win32-2.7\lxml\includes copying src\lxml\includes\xmlschema.pxd -> build\lib.win32-2.7\lxml\includes copying src\lxml\includes\xpath.pxd -> build\lib.win32-2.7\lxml\includes copying src\lxml\includes\xslt.pxd -> build\lib.win32-2.7\lxml\includes copying src\lxml\includes\__init__.pxd -> build\lib.win32-2.7\lxml\includes copying src\lxml\includes\etree_defs.h -> build\lib.win32-2.7\lxml\includes copying src\lxml\includes\lxml-version.h -> build\lib.win32-2.7\lxml\includes creating build\lib.win32-2.7\lxml\isoschematron\resources creating build\lib.win32-2.7\lxml\isoschematron\resources\rng copying src\lxml\isoschematron\resources\rng\iso-schematron.rng -> build\lib.win32-2.7\lxml\isoschematron\resources\rng creating build\lib.win32-2.7\lxml\isoschematron\resources\xsl copying src\lxml\isoschematron\resources\xsl\RNG2Schtrn.xsl -> build\lib.win32-2.7\lxml\isoschematron\resources\xsl copying src\lxml\isoschematron\resources\xsl\XSD2Schtrn.xsl -> build\lib.win32-2.7\lxml\isoschematron\resources\xsl creating build\lib.win32-2.7\lxml\isoschematron\resources\xsl\iso-schematron-xslt1 copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_abstract_expand.xsl -> build\lib.win32-2.7\lxml\isoschematron\resources\xsl\iso-schematro n-xslt1 copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_dsdl_include.xsl -> build\lib.win32-2.7\lxml\isoschematron\resources\xsl\iso-schematron-x slt1 copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_schematron_message.xsl -> build\lib.win32-2.7\lxml\isoschematron\resources\xsl\iso-schema tron-xslt1 copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_schematron_skeleton_for_xslt1.xsl -> build\lib.win32-2.7\lxml\isoschematron\resources\xsl \iso-schematron-xslt1 copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_svrl_for_xslt1.xsl -> build\lib.win32-2.7\lxml\isoschematron\resources\xsl\iso-schematron -xslt1 copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\readme.txt -> build\lib.win32-2.7\lxml\isoschematron\resources\xsl\iso-schematron-xslt1 running build_ext building 'lxml.etree' extension error: Microsoft Visual C++ 9.0 is required. Get it from http://aka.ms/vcpython27 ---------------------------------------- ERROR: Failed building wheel for lxml Running setup.py clean for lxml Successfully built uiautomator2 Failed to build lxml Installing collected packages: lxml, uiautomator2 Running setup.py install for lxml ... error ERROR: Command errored out with exit status 1: command: 'C:\Users\V82406169\PycharmProjects\test2\.venv\Scripts\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'c:\\users\\v82406~1 \\appdata\\local\\temp\\pip-install-c1vhye\\lxml\\setup.py'"'"'; __file__='"'"'c:\\users\\v82406~1\\appdata\\local\\temp\\pip-install-c1vhye\\lxml\\setup.py'"'"' ;f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'c:\users\v82406~1\appdata\local\temp\pip-record-y0cvp8\install-record.txt' --single-version-externally-managed --compile --install-headers 'C: \Users\V82406169\PycharmProjects\test2\.venv\include\site\python2.7\lxml' cwd: c:\users\v82406~1\appdata\local\temp\pip-install-c1vhye\lxml\ Complete output (102 lines): Building lxml version 5.0.2. Building without Cython. Building against pre-built libxml2 andl libxslt libraries running install running build running build_py creating build creating build\lib.win32-2.7 creating build\lib.win32-2.7\lxml copying src\lxml\builder.py -> build\lib.win32-2.7\lxml copying src\lxml\cssselect.py -> build\lib.win32-2.7\lxml copying src\lxml\doctestcompare.py -> build\lib.win32-2.7\lxml copying src\lxml\ElementInclude.py -> build\lib.win32-2.7\lxml copying src\lxml\pyclasslookup.py -> build\lib.win32-2.7\lxml copying src\lxml\sax.py -> build\lib.win32-2.7\lxml copying src\lxml\usedoctest.py -> build\lib.win32-2.7\lxml copying src\lxml\_elementpath.py -> build\lib.win32-2.7\lxml copying src\lxml\__init__.py -> build\lib.win32-2.7\lxml creating build\lib.win32-2.7\lxml\includes copying src\lxml\includes\__init__.py -> build\lib.win32-2.7\lxml\includes creating build\lib.win32-2.7\lxml\html copying src\lxml\html\builder.py -> build\lib.win32-2.7\lxml\html copying src\lxml\html\clean.py -> build\lib.win32-2.7\lxml\html copying src\lxml\html\defs.py -> build\lib.win32-2.7\lxml\html copying src\lxml\html\diff.py -> build\lib.win32-2.7\lxml\html copying src\lxml\html\ElementSoup.py -> build\lib.win32-2.7\lxml\html copying src\lxml\html\formfill.py -> build\lib.win32-2.7\lxml\html copying src\lxml\html\html5parser.py -> build\lib.win32-2.7\lxml\html copying src\lxml\html\soupparser.py -> build\lib.win32-2.7\lxml\html copying src\lxml\html\usedoctest.py -> build\lib.win32-2.7\lxml\html copying src\lxml\html\_diffcommand.py -> build\lib.win32-2.7\lxml\html copying src\lxml\html\_html5builder.py -> build\lib.win32-2.7\lxml\html copying src\lxml\html\_setmixin.py -> build\lib.win32-2.7\lxml\html copying src\lxml\html\__init__.py -> build\lib.win32-2.7\lxml\html creating build\lib.win32-2.7\lxml\isoschematron copying src\lxml\isoschematron\__init__.py -> build\lib.win32-2.7\lxml\isoschematron copying src\lxml\etree.h -> build\lib.win32-2.7\lxml copying src\lxml\etree_api.h -> build\lib.win32-2.7\lxml copying src\lxml\lxml.etree.h -> build\lib.win32-2.7\lxml copying src\lxml\lxml.etree_api.h -> build\lib.win32-2.7\lxml copying src\lxml\etree.pyx -> build\lib.win32-2.7\lxml copying src\lxml\objectify.pyx -> build\lib.win32-2.7\lxml copying src\lxml\apihelpers.pxi -> build\lib.win32-2.7\lxml copying src\lxml\classlookup.pxi -> build\lib.win32-2.7\lxml copying src\lxml\cleanup.pxi -> build\lib.win32-2.7\lxml copying src\lxml\debug.pxi -> build\lib.win32-2.7\lxml copying src\lxml\docloader.pxi -> build\lib.win32-2.7\lxml copying src\lxml\dtd.pxi -> build\lib.win32-2.7\lxml copying src\lxml\extensions.pxi -> build\lib.win32-2.7\lxml copying src\lxml\iterparse.pxi -> build\lib.win32-2.7\lxml copying src\lxml\nsclasses.pxi -> build\lib.win32-2.7\lxml copying src\lxml\objectpath.pxi -> build\lib.win32-2.7\lxml copying src\lxml\parser.pxi -> build\lib.win32-2.7\lxml copying src\lxml\parsertarget.pxi -> build\lib.win32-2.7\lxml copying src\lxml\proxy.pxi -> build\lib.win32-2.7\lxml copying src\lxml\public-api.pxi -> build\lib.win32-2.7\lxml copying src\lxml\readonlytree.pxi -> build\lib.win32-2.7\lxml copying src\lxml\relaxng.pxi -> build\lib.win32-2.7\lxml copying src\lxml\saxparser.pxi -> build\lib.win32-2.7\lxml copying src\lxml\schematron.pxi -> build\lib.win32-2.7\lxml copying src\lxml\serializer.pxi -> build\lib.win32-2.7\lxml copying src\lxml\xinclude.pxi -> build\lib.win32-2.7\lxml copying src\lxml\xmlerror.pxi -> build\lib.win32-2.7\lxml copying src\lxml\xmlid.pxi -> build\lib.win32-2.7\lxml copying src\lxml\xmlschema.pxi -> build\lib.win32-2.7\lxml copying src\lxml\xpath.pxi -> build\lib.win32-2.7\lxml copying src\lxml\xslt.pxi -> build\lib.win32-2.7\lxml copying src\lxml\xsltext.pxi -> build\lib.win32-2.7\lxml copying src\lxml\includes\c14n.pxd -> build\lib.win32-2.7\lxml\includes copying src\lxml\includes\config.pxd -> build\lib.win32-2.7\lxml\includes copying src\lxml\includes\dtdvalid.pxd -> build\lib.win32-2.7\lxml\includes copying src\lxml\includes\etreepublic.pxd -> build\lib.win32-2.7\lxml\includes copying src\lxml\includes\htmlparser.pxd -> build\lib.win32-2.7\lxml\includes copying src\lxml\includes\relaxng.pxd -> build\lib.win32-2.7\lxml\includes copying src\lxml\includes\schematron.pxd -> build\lib.win32-2.7\lxml\includes copying src\lxml\includes\tree.pxd -> build\lib.win32-2.7\lxml\includes copying src\lxml\includes\uri.pxd -> build\lib.win32-2.7\lxml\includes copying src\lxml\includes\xinclude.pxd -> build\lib.win32-2.7\lxml\includes copying src\lxml\includes\xmlerror.pxd -> build\lib.win32-2.7\lxml\includes copying src\lxml\includes\xmlparser.pxd -> build\lib.win32-2.7\lxml\includes copying src\lxml\includes\xmlschema.pxd -> build\lib.win32-2.7\lxml\includes copying src\lxml\includes\xpath.pxd -> build\lib.win32-2.7\lxml\includes copying src\lxml\includes\xslt.pxd -> build\lib.win32-2.7\lxml\includes copying src\lxml\includes\__init__.pxd -> build\lib.win32-2.7\lxml\includes copying src\lxml\includes\etree_defs.h -> build\lib.win32-2.7\lxml\includes copying src\lxml\includes\lxml-version.h -> build\lib.win32-2.7\lxml\includes creating build\lib.win32-2.7\lxml\isoschematron\resources creating build\lib.win32-2.7\lxml\isoschematron\resources\rng copying src\lxml\isoschematron\resources\rng\iso-schematron.rng -> build\lib.win32-2.7\lxml\isoschematron\resources\rng creating build\lib.win32-2.7\lxml\isoschematron\resources\xsl copying src\lxml\isoschematron\resources\xsl\RNG2Schtrn.xsl -> build\lib.win32-2.7\lxml\isoschematron\resources\xsl copying src\lxml\isoschematron\resources\xsl\XSD2Schtrn.xsl -> build\lib.win32-2.7\lxml\isoschematron\resources\xsl creating build\lib.win32-2.7\lxml\isoschematron\resources\xsl\iso-schematron-xslt1 copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_abstract_expand.xsl -> build\lib.win32-2.7\lxml\isoschematron\resources\xsl\iso-schemat ron-xslt1 copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_dsdl_include.xsl -> build\lib.win32-2.7\lxml\isoschematron\resources\xsl\iso-schematron -xslt1 copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_schematron_message.xsl -> build\lib.win32-2.7\lxml\isoschematron\resources\xsl\iso-sche matron-xslt1 copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_schematron_skeleton_for_xslt1.xsl -> build\lib.win32-2.7\lxml\isoschematron\resources\x sl\iso-schematron-xslt1 copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_svrl_for_xslt1.xsl -> build\lib.win32-2.7\lxml\isoschematron\resources\xsl\iso-schematr on-xslt1 copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\readme.txt -> build\lib.win32-2.7\lxml\isoschematron\resources\xsl\iso-schematron-xslt1 running build_ext building 'lxml.etree' extension error: Microsoft Visual C++ 9.0 is required. Get it from http://aka.ms/vcpython27 ---------------------------------------- ERROR: Command errored out with exit status 1: 'C:\Users\V82406169\PycharmProjects\test2\.venv\Scripts\python.exe' -u -c 'import sys, setuptools, tokenize; sys.a rgv[0] = '"'"'c:\\users\\v82406~1\\appdata\\local\\temp\\pip-install-c1vhye\\lxml\\setup.py'"'"'; __file__='"'"'c:\\users\\v82406~1\\appdata\\local\\temp\\pip-in stall-c1vhye\\lxml\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile( code, __file__, '"'"'exec'"'"'))' install --record 'c:\users\v82406~1\appdata\local\temp\pip-record-y0cvp8\install-record.txt' --single-version-externally-manage d --compile --install-headers 'C:\Users\V82406169\PycharmProjects\test2\.venv\include\site\python2.7\lxml' Check the logs for full command output.
最新发布
11-22
(2)根据下列XML Schema文档定义的XML文档的结构及每个元素的数据类型,自行书写XML文档的数据内容,并设计该XML文档在页面中显示的样式,写出对映的XML文档及对映的xsl文件。 编写折半法查找的程序。 <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <xsd:simpleType name="bookprice"> <xsd:restriction base="xsd:decimal"> <xsd:totalDigits value="6"/> <xsd:fractionDigits value="2"/> <xsd:minInclusive value="0.00"/> <xsd:maxInclusive value="100.00"/> <!-- 用fractionDigits,totalDigits时 数据 类型应写成 base="xsd:decimal" 写成 float 错误 --> </xsd:restriction> </xsd:simpleType> <xsd:simpleType name="category"> <xsd:restriction base="xsd:token"> <xsd:enumeration value="小说"/> <xsd:enumeration value="散文"/> <xsd:enumeration value="传记"/> <xsd:enumeration value="诗歌"/> <xsd:enumeration value="武侠"/> <xsd:enumeration value="纪实"/> </xsd:restriction> </xsd:simpleType> <xsd:simpleType name="categoylist"> <xsd:list itemType="category"/> </xsd:simpleType> <xsd:simpleType name="threeBookCate"> <xsd:restriction base="categoylist"> <xsd:length value="3"/> </xsd:restriction> </xsd:simpleType> <xsd:element name="booklist"> <xsd:complexType> <xsd:sequence> <xsd:element name="categoylist" type="categoylist"/> <xsd:element name="threeBookCategory" type="threeBookCate"/> <xsd:element ref="book"/> </xsd:sequence> </xsd:complexType> </xsd:element> <xsd:element name="book"> <xsd:complexType> <xsd:sequence> <xsd:element name="title" type="xsd:string"/> <xsd:element name="author" type="xsd:string"/> <xsd:element name="price" type="bookprice"/> <xsd:element name="resume" type="xsd:string"/> <xsd:element name="recommendation" type="xsd:string"/> <xsd:element name="publish" minOccurs="0" maxOccurs="unbounded"> <xsd:complexType> <xsd:sequence> <xsd:element name="publisher" type="xsd:string"/> <xsd:element name="pubdate" type="xsd:date"/> </xsd:sequence> </xsd:complexType> </xsd:element> <xsd:element name="category" type="category"/> </xsd:sequence> <xsd:attribute name="isbn" type="xsd:string"/> </xsd:complexType> </xsd:element> </xsd:schema>
05-24
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值