[Jiemamy-notify] commit [2075] xsdのTODOをいくつか解決。

アーカイブの一覧に戻る

svnno****@sourc***** svnno****@sourc*****
2008年 11月 5日 (水) 00:52:41 JST


Revision: 2075
          http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=jiemamy&view=rev&rev=2075
Author:   daisuke_m
Date:     2008-11-05 00:52:41 +0900 (Wed, 05 Nov 2008)

Log Message:
-----------
xsdのTODOをいくつか解決。

Modified Paths:
--------------
    zeus/trunk/org.jiemamy.spec.core/src/main/resources/jiemamy-core.xsd
    zeus/trunk/org.jiemamy.spec.core/src/main/resources/sample-validation-target.xml


-------------- next part --------------
Modified: zeus/trunk/org.jiemamy.spec.core/src/main/resources/jiemamy-core.xsd
===================================================================
--- zeus/trunk/org.jiemamy.spec.core/src/main/resources/jiemamy-core.xsd	2008-11-04 15:06:03 UTC (rev 2074)
+++ zeus/trunk/org.jiemamy.spec.core/src/main/resources/jiemamy-core.xsd	2008-11-04 15:52:41 UTC (rev 2075)
@@ -43,11 +43,21 @@
 					</xsd:complexType>
 				</xsd:element>
 				<xsd:element ref="insertDataSetModels" />
-				<xsd:element ref="diagramPresentations" />
-				<!-- TODO 最後はどんなタグ来てもいいよー、としなければならん。どんな追加仕様があるかわからんので。diagramPresentationsもそれに含まれるべき。 -->
+				<xsd:any minOccurs="0" maxOccurs="unbounded" namespace="##other" processContents="lax"/>
 			</xsd:sequence>
 			<xsd:attribute name="id" type="uuidType" use="required" />
 		</xsd:complexType>
+		
+		<!-- 
+		<xsd:key name="jiemamyModelId">
+			<xsd:selector xpath="//*" />
+			<xsd:field xpath="@id" />
+		</xsd:key>	
+		<xsd:keyref name="jiemamyModelIdReference" refer="jiemamyModelId">
+			<xsd:selector xpath="//*" />
+			<xsd:field xpath="@ref" />
+		</xsd:keyref>
+		-->
 	</xsd:element>
 
 
@@ -159,7 +169,7 @@
 			<xsd:sequence>
 				<xsd:element ref="name" minOccurs="0" />
 				<xsd:element ref="logicalName" minOccurs="0" />
-				<!-- TODO 下記source/targetは、idの時はminOccurs=1, refの時はminOccurs=0にしたい。 -->
+				<!-- TODO 下記source/target/mappingsは、idの時はminOccurs=1, refの時はminOccurs=0にしたい。 -->
 				<xsd:element name="source" minOccurs="0">
 					<xsd:complexType>
 						<xsd:attribute name="ref" type="uuidRefType" use="required" />
@@ -217,9 +227,7 @@
 				</xsd:element>
 				<xsd:element ref="description" minOccurs="0" />
 			</xsd:sequence>
-			<!-- TODO idとrefどちらもナシは禁止したい。 -->
-			<xsd:attribute name="id" type="uuidType" use="optional" />
-			<xsd:attribute name="ref" type="uuidRefType" use="optional" />
+			<xsd:attribute name="id" type="uuidType" use="required" />
 		</xsd:complexType>
 	</xsd:element>
 
@@ -246,8 +254,8 @@
 						<xsd:sequence>
 							<xsd:element ref="name" />
 						</xsd:sequence>
+						<xsd:attribute name="id" type="uuidType" use="required" />
 						<xsd:attribute name="class" type="fqcnType" use="required" />
-						<xsd:attribute name="id" type="uuidType" use="required" />
 					</xsd:complexType>
 				</xsd:element>
 			</xsd:sequence>
@@ -266,8 +274,13 @@
 	<xsd:element name="insertDataSetModels" type="xsd:string" />
 	<xsd:element name="diagramPresentations" type="xsd:string" />
 	
-	<!-- TODO 内部を自由形にしないとなぁ -->
-	<xsd:element name="options" type="xsd:string" />
+	<xsd:element name="options">
+		<xsd:complexType>
+			<xsd:sequence>
+				<xsd:any minOccurs="0" maxOccurs="unbounded" namespace="##other" processContents="lax"/>
+			</xsd:sequence>
+		</xsd:complexType>
+	</xsd:element>
 
 	<!-- TODO これ自体を自由形にしないとなぁ -->
 	<xsd:element name="size" type="xsd:positiveInteger" />

Modified: zeus/trunk/org.jiemamy.spec.core/src/main/resources/sample-validation-target.xml
===================================================================
--- zeus/trunk/org.jiemamy.spec.core/src/main/resources/sample-validation-target.xml	2008-11-04 15:06:03 UTC (rev 2074)
+++ zeus/trunk/org.jiemamy.spec.core/src/main/resources/sample-validation-target.xml	2008-11-04 15:52:41 UTC (rev 2075)
@@ -2,7 +2,8 @@
 <rootModel id="d5a96af3-b1e9-4285-a8ef-c491ce5ae308"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xsi:schemaLocation="http://jiemamy.org/xml/ns/core jiemamy-core.xsd"
-xmlns="http://jiemamy.org/xml/ns/core">
+xmlns="http://jiemamy.org/xml/ns/core"
+xmlns:view="http://jiemamy.org/xml/ns/view">
   <dialectClass>org.jiemamy.dialect.mysql.MySqlDialect</dialectClass>
   <schemaName>FOO</schemaName>
   <beginScript>BEGIN;</beginScript>
@@ -303,6 +304,6 @@
     </foreignKey>
   </connections>
   <insertDataSetModels/>
-  <diagramPresentations/>
+  <view:diagramPresentations/>
 </rootModel>
 


Jiemamy-notify メーリングリストの案内
アーカイブの一覧に戻る