Return-Path: Delivered-To: apmail-commons-commits-archive@minotaur.apache.org Received: (qmail 7994 invoked from network); 16 Jun 2010 15:42:25 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 16 Jun 2010 15:42:25 -0000 Received: (qmail 47958 invoked by uid 500); 16 Jun 2010 15:42:25 -0000 Delivered-To: apmail-commons-commits-archive@commons.apache.org Received: (qmail 47838 invoked by uid 500); 16 Jun 2010 15:42:24 -0000 Mailing-List: contact commits-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@commons.apache.org Delivered-To: mailing list commits@commons.apache.org Received: (qmail 47831 invoked by uid 99); 16 Jun 2010 15:42:24 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 Jun 2010 15:42:24 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 Jun 2010 15:42:21 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 84B3C2388999; Wed, 16 Jun 2010 15:41:34 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r955275 - in /commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.diagram: src/org/apache/commons/scxml/modeling/export/ xslt/ Date: Wed, 16 Jun 2010 15:41:34 -0000 To: commits@commons.apache.org From: guixl@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20100616154134.84B3C2388999@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: guixl Date: Wed Jun 16 15:41:34 2010 New Revision: 955275 URL: http://svn.apache.org/viewvc?rev=955275&view=rev Log: Import SCXML document export function Modified: commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.diagram/src/org/apache/commons/scxml/modeling/export/ModelingDocumentExportWizard.java commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.diagram/src/org/apache/commons/scxml/modeling/export/ScxmlExportStreamHandlerAction.java commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.diagram/xslt/export.xsl Modified: commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.diagram/src/org/apache/commons/scxml/modeling/export/ModelingDocumentExportWizard.java URL: http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.diagram/src/org/apache/commons/scxml/modeling/export/ModelingDocumentExportWizard.java?rev=955275&r1=955274&r2=955275&view=diff ============================================================================== --- commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.diagram/src/org/apache/commons/scxml/modeling/export/ModelingDocumentExportWizard.java (original) +++ commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.diagram/src/org/apache/commons/scxml/modeling/export/ModelingDocumentExportWizard.java Wed Jun 16 15:41:34 2010 @@ -196,7 +196,7 @@ public class ModelingDocumentExportWizar int diagramVID = ModelingVisualIDRegistry .getDiagramVisualID(diagramRootElementSelectionPage .getModelElement()); - monitor.beginTask("SCXML document export progress",7); + monitor.beginTask("SCXML document export progress",9); try { @@ -204,6 +204,8 @@ public class ModelingDocumentExportWizar // get target list by regular expression ScxmlExportStreamHandlerAction shc = new ScxmlExportStreamHandlerAction( modelFile.getContents()); + shc.contentPreHandler(); + monitor.worked(1); shc.getTargetList(); monitor.worked(1); shc.transferToXpath(); @@ -217,6 +219,8 @@ public class ModelingDocumentExportWizar .getClass().getClassLoader().getResourceAsStream( "xslt/export.xsl")); monitor.worked(1); + content=content.replace("xmlns_attribute_url_in_xslt_file", "xmlns"); + monitor.worked(1); xmlFile.setContents(shc.string2InputStream(content), 1, null); monitor.worked(1); if (monitor.isCanceled()) throw new InterruptedException( Modified: commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.diagram/src/org/apache/commons/scxml/modeling/export/ScxmlExportStreamHandlerAction.java URL: http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.diagram/src/org/apache/commons/scxml/modeling/export/ScxmlExportStreamHandlerAction.java?rev=955275&r1=955274&r2=955275&view=diff ============================================================================== --- commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.diagram/src/org/apache/commons/scxml/modeling/export/ScxmlExportStreamHandlerAction.java (original) +++ commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.diagram/src/org/apache/commons/scxml/modeling/export/ScxmlExportStreamHandlerAction.java Wed Jun 16 15:41:34 2010 @@ -74,6 +74,9 @@ public class ScxmlExportStreamHandlerAct inputStream2String(input); } + public void contentPreHandler(){ + streamContnet=streamContnet.replace("org.apache.commons.scxml:ServiceTemplate", "ServiceTemplate"); + } public void getTargetList() { String regx = "targetStatus=\"\\S+\""; Pattern p = Pattern.compile(regx); Modified: commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.diagram/xslt/export.xsl URL: http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.diagram/xslt/export.xsl?rev=955275&r1=955274&r2=955275&view=diff ============================================================================== --- commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.diagram/xslt/export.xsl (original) +++ commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.diagram/xslt/export.xsl Wed Jun 16 15:41:34 2010 @@ -3,9 +3,13 @@ - + + + + 1.0 + http://www.w3.org/2005/07/scxml - + @@ -15,6 +19,13 @@ + + + + + + +