📄 xsdelement.vm
字号:
## TODO: split XSDElementRef into a separate velocity template
#if( $modelElement.XSDClassName == "XSDElementRef" )
<xs:element ref="$!modelElement.ReferencedElement.XMLQName"
#XSDMultiplicity($modelElement)
#if( $modelElement.Id ) id="$modelElement.Id"#end >
#PrintXSDAnnotation( $modelElement )
</xs:element>
## anonymous embedded type definition
#elseif( ! $modelElement.Type.isTopLevel() )
<xs:element name="$modelElement.Name" #XSDMultiplicity($modelElement)
#if( $modelElement.Id ) id="$modelElement.Id"#end >
#PrintXSDAnnotation( $modelElement )
#ProcessXSD( $modelElement.Type )
</xs:element>
#elseif( $modelElement.isAnonymousType() || $modelElement.Type.XSDClassName == "XSDSimpleType" )
<xs:element name="$modelElement.Name" type="$modelElement.Type.XMLQName"
#XSDMultiplicity($modelElement)
#if( $modelElement.Id ) id="$modelElement.Id"#end >
#PrintXSDAnnotation( $modelElement )
</xs:element>
#else
<xs:element name="$modelElement.Name"#if( $modelElement.MinOccurs == 0 ) minOccurs="0"#end
#if( $modelElement.Id ) id="$modelElement.Id"#end >
#PrintXSDAnnotation( $modelElement )
<xs:complexType>
<xs:sequence>
<xs:element ref="$!modelElement.Type.TopLevelElement.XMLQName"
#XSDMultiplicity($modelElement)/>
</xs:sequence>
</xs:complexType>
</xs:element>
#end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -