Jsonix-schema-compiler 无法将 .xsd 文件转换为 JSON 对象
Jsonix-schema-compiler cannot convert .xsd file to JSON Object
我将几个 .xsd 文件转换为一个 JSON 对象 jsonix-schema-compiler,但有一个 .xsd 具有合格的命名空间。
以下 .xsd 无法转换 - 没有错误消息,但也没有生成输出。我尝试将日志输出切换为 TRACE,但这无济于事,因为它什么也没有输出。
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="urn:ietf:params:xml:ns:lost1" xmlns:p2="http://www.opengis.net/gml" xmlns:ns1="urn:ietf:params:xml:ns:lost1">
<xs:import namespace="http://www.opengis.net/gml" schemaLocation="p2.xsd"/>
<xs:element name="findService">
<xs:complexType>
<xs:sequence>
<xs:element ref="ns1:location"/>
<xs:element ref="ns1:service"/>
</xs:sequence>
<xs:attribute name="recursive" use="required" type="xs:boolean"/>
<xs:attribute name="serviceBoundary" use="required" type="xs:NCName"/>
</xs:complexType>
</xs:element>
<xs:element name="location">
<xs:complexType>
<xs:sequence>
<xs:element ref="p2:Point"/>
</xs:sequence>
<xs:attribute name="id" use="required" type="xs:NMTOKEN"/>
<xs:attribute name="profile" use="required" type="xs:NCName"/>
</xs:complexType>
</xs:element>
<xs:element name="service" type="xs:NMTOKEN"/>
</xs:schema>
知道为什么无法转换吗?
不试一试就很难说。请向我发送带有重现测试用例的拉取请求:
https://github.com/highsource/jsonix-support/
下面是此类测试项目的示例:
https://github.com/highsource/jsonix-support/tree/master/s/shiporder
免责声明:我是Jsonix的作者。
我将几个 .xsd 文件转换为一个 JSON 对象 jsonix-schema-compiler,但有一个 .xsd 具有合格的命名空间。
以下 .xsd 无法转换 - 没有错误消息,但也没有生成输出。我尝试将日志输出切换为 TRACE,但这无济于事,因为它什么也没有输出。
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="urn:ietf:params:xml:ns:lost1" xmlns:p2="http://www.opengis.net/gml" xmlns:ns1="urn:ietf:params:xml:ns:lost1">
<xs:import namespace="http://www.opengis.net/gml" schemaLocation="p2.xsd"/>
<xs:element name="findService">
<xs:complexType>
<xs:sequence>
<xs:element ref="ns1:location"/>
<xs:element ref="ns1:service"/>
</xs:sequence>
<xs:attribute name="recursive" use="required" type="xs:boolean"/>
<xs:attribute name="serviceBoundary" use="required" type="xs:NCName"/>
</xs:complexType>
</xs:element>
<xs:element name="location">
<xs:complexType>
<xs:sequence>
<xs:element ref="p2:Point"/>
</xs:sequence>
<xs:attribute name="id" use="required" type="xs:NMTOKEN"/>
<xs:attribute name="profile" use="required" type="xs:NCName"/>
</xs:complexType>
</xs:element>
<xs:element name="service" type="xs:NMTOKEN"/>
</xs:schema>
知道为什么无法转换吗?
不试一试就很难说。请向我发送带有重现测试用例的拉取请求:
https://github.com/highsource/jsonix-support/
下面是此类测试项目的示例:
https://github.com/highsource/jsonix-support/tree/master/s/shiporder
免责声明:我是Jsonix的作者。