我正在处理XML分配,我不确定是否正确执行此部分。 其要求于:了解XML模式数据类型
•grantType,基于该ID数据类型和以下正则表达式模式 “[AZ] {6} - \ d {4} - \ d {2}”
•基于字符串的数据类型,并限于下列值fundingType: 联邦,州,地方和私人
被扔我送行的部分是当它要求遵循正则表达式模式是我想输入reg模式还是假设它像我在下面那样?
这是我到目前为止有:
<?xml version="1.0" encoding="UTF-8"?>
<grant grantNum="NIHCCC-4481-05" funding="federal government">
<title>NIH Clinical Cancer Basic Research Grant</title>
<agency>National Institute of Health</agency>
<department>University Hospital Clinical Cancer Center</department>
<summary>Basic NIH support funding for current and future Phase 1 through
Phase 3 cancer clinical trials.</summary>
<initiated>2006-07-01</initiated>
<expires>2010-06-30</expires>
<coordinator>Alice Walters</coordinator>
</grant>
我的架构:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
xmlns:"http://uhosp.edu/grant/ns"
targetNamespace="http://uhosp.edu/grant/ns"
<xs:element name="grant">
<xs:complexType>
<xs:sequence>
<xs:element type="xs:string" name="title"/>
<xs:element type="xs:string" name="agency"/>
<xs:element type="xs:string" name="department"/>
<xs:element type="xs:string" name="summary"/>
<xs:element type="xs:date" name="initiated"/>
<xs:element type="xs:date" name="expires"/>
<xs:element type="xs:string" name="coordinator"/>
</xs:sequence>
<xs:attribute type="xs:string" name="grantNum"/>
<xs:attribute type="xs:string" name="funding"/>
</xs:complexType>
</xs:element>
</xs:schema>
我看到我错在哪里谢谢主席先生 – 2014-10-06 15:08:47