[Jiemamy-notify:1525] commit [2738] linux環境でXMLのバリデーションが通らないので、ひとまずLinuxではバリデーションを避ける。

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2009年 2月 26日 (木) 00:40:17 JST


Revision: 2738
          http://svn.sourceforge.jp/view?root=jiemamy&view=rev&rev=2738
Author:   daisuke_m
Date:     2009-02-26 00:40:17 +0900 (Thu, 26 Feb 2009)

Log Message:
-----------
linux環境でXMLのバリデーションが通らないので、ひとまずLinuxではバリデーションを避ける。
オチてる箇所を見誤ったw

Modified Paths:
--------------
    artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/serializer/JiemamyDomSerializer.java


-------------- next part --------------
Modified: artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/serializer/JiemamyDomSerializer.java
===================================================================
--- artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/serializer/JiemamyDomSerializer.java	2009-02-25 15:34:55 UTC (rev 2737)
+++ artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/serializer/JiemamyDomSerializer.java	2009-02-25 15:40:17 UTC (rev 2738)
@@ -148,20 +148,20 @@
 		DocumentBuilder documentBuilder = DOCUMENT_BUILDER_FACTORY.newDocumentBuilder();
 		Document document = documentBuilder.parse(in);
 		
-		// XML SchemaのDOMを作る
-		DocumentBuilderFactory factory0 = DocumentBuilderFactory.newInstance();
-		DocumentBuilder builder0 = factory0.newDocumentBuilder();
-		Document coreXsd = builder0.parse(JiemamySerializer.class.getResourceAsStream("/jiemamy-core.xsd"));
-		Document viewXsd = builder0.parse(JiemamySerializer.class.getResourceAsStream("/jiemamy-view.xsd"));
-		
-		// XML Schemaオブジェクトを作る
-		SchemaFactory schemaFactory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
-		Schema schema = schemaFactory.newSchema(new Source[] {
-			new DOMSource(coreXsd),
-			new DOMSource(viewXsd)
-		});
-		
 		if (SystemUtils.OS_NAME.toLowerCase().equals("linux") == false) {
+			// XML SchemaのDOMを作る
+			DocumentBuilderFactory factory0 = DocumentBuilderFactory.newInstance();
+			DocumentBuilder builder0 = factory0.newDocumentBuilder();
+			Document coreXsd = builder0.parse(JiemamySerializer.class.getResourceAsStream("/jiemamy-core.xsd"));
+			Document viewXsd = builder0.parse(JiemamySerializer.class.getResourceAsStream("/jiemamy-view.xsd"));
+			
+			// XML Schemaオブジェクトを作る
+			SchemaFactory schemaFactory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
+			Schema schema = schemaFactory.newSchema(new Source[] {
+				new DOMSource(coreXsd),
+				new DOMSource(viewXsd)
+			});
+			
 			// 妥当性検証
 			Validator validator = schema.newValidator();
 			validator.validate(new DOMSource(document));



Jiemamy-notify メーリングリストの案内
Back to archive index