Schema之key、keyref
2014-06-22 17:04
288 查看
<xs:element name="Area" type="AreaType"> <xs:key name="NameKey"> <xs:selector xpath=". |.//Area |.//Part"/> <xs:field xpath="@Name"/> </xs:key> <xs:key name="PropertyNameKey"> <xs:selector xpath="./Property-List/Property"/> <xs:field xpath="@Name"/> </xs:key> </xs:element>上面的name名为NameKey的xs:key表示Area节点和Area节点下的所有Area和Part的Name属性都不允许相同name名为PropertyNameKey表示Area下Property-List下的所有Property的Name属性都是唯一的key
keyref
Xpath最后列举几个Xpath的用法
/AAA |
---|
选择根元素AAA |
<AAA> <BBB/> <CCC/> <BBB/> <BBB/> <DDD> <BBB/> </DDD> <CCC/> </AAA> |
/AAA/DDD/BBB |
---|
选择AAA的子元素DDD的所有子元素 |
<AAA> <BBB/> <CCC/> <BBB/> <BBB/> <DDD> <BBB/> </DDD> <CCC/> </AAA> |
在XLab中打开实例 | 树视图(JPG) |
//BBB |
---|
选择所有BBB元素 |
<AAA> <BBB/> <CCC/> <BBB/> <DDD> <BBB/> </DDD> <CCC> <DDD> <BBB/> <BBB/> </DDD> </CCC> </AAA> |
相关文章推荐
- Schema元素xsd:key和xsd:keyref
- information_schema.key_column_usage 学习
- Error: Duplicate key name 'PCS_STATS_IDX' (state=42000,code=1061) ----Hive schematool -initSchema
- QueryElevationComponent requires the schema to have a uniqueKeyField implemented using StrField
- XML Schema使用技巧——key和keyref
- Schema 中的 key 元素
- git config命令使用第二篇——section操作,多个key值操作,使用正则
- ios 开发之 Xcode6 No valid signing identities (i.e. certificate and private key pair) matching...
- http://www.springframework.org/schema/context/spring-context-3.2.xsd
- Error encountered when performing Introspect schema xxx 错误的解决方法
- solr schema.xml的fields节点
- TortoiseGit 与 Putty 配置冲突导致 Server refuse our key
- DataFrame转化成RDD-[2]schema法
- Oracle--查询表空间、schema、表等存储情况操作
- std::hash_multimap 遍历同一key下的不同value
- hive的Specified key was too long; max key length is 767 bytes问题解决
- Working with SSH key passphrases
- HashMap、HashTable的key和value是否可为null
- key驱动调试问题总结
- cocos2d-x中描述精灵帧图片的plist和json文件各个key的含义