mybatis / ibatis2mybatis Goto Github PK
View Code? Open in Web Editor NEWTool to convert iBATIS 2 xml files to MyBatis3
License: Apache License 2.0
Tool to convert iBATIS 2 xml files to MyBatis3
License: Apache License 2.0
I have a problem:When <result select=""> is converted to <association>, the <association> is not at the end
source
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN"
"sql-map-2.dtd">
<sqlMap namespace="ns1">
<resultMap id="rm1" class="a.b.T1">
<result column="ID" property="id" jdbcType="DECIMAL" />
<result column="AID" property="aid" select="ns2.s1" />
<result column="NAME" property="name" jdbcType="VARCHAR2" />
</resultMap>
</sqlMap>
destination
<?xml version="1.0" encoding="UTF-8"?><!--Converted at: Tue Jan 26 14:03:48 CST 2021-->
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="ns1">
<resultMap id="rm1" type="a.b.T1">
<result property="id" column="ID" jdbcType="DECIMAL"/>
<association property="aid" select="ns2.s1" column="AID"/>
<result property="name" column="NAME" jdbcType="VARCHAR2"/>
</resultMap>
</mapper>
output
PS C:\download\ibatis2mybatis-master> ant
Buildfile: build.xml
migrateToMyBatis3:
[xslt] Transforming into C:\download\ibatis2mybatis-master\destination
[xslt] Processing C:\download\ibatis2mybatis-master\source\TestMap.xml to C:\download\ibatis2mybatis-master\destination\TestMap.xml
[xslt] Loading stylesheet C:\download\ibatis2mybatis-master\migrate.xslt
[xslt] Warning: org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser: Property 'http://javax.xml.XMLConstants/property/accessExternalDTD' is not recognized.
[xslt] Warning: org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser: Property 'http://www.oracle.com/xml/jaxp/properties/entityExpansionLimit' is not recognized.
[xmlvalidate] C:\download\ibatis2mybatis-master\destination\TestMap.xml:10:14: The content of element type "resultMap" must match "(constructor?,id*,result*,association*,collection*,discriminator?)".
BUILD FAILED
C:\download\ibatis2mybatis-master\build.xml:46: C:\download\ibatis2mybatis-master\destination\TestMap.xml is not a valid XML document.
This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.
This repository currently has no open or pending branches.
.github/workflows/ci.yaml
actions/checkout v4
actions/setup-java v4
.github/workflows/codeql.yml
actions/checkout v4
actions/setup-java v4
github/codeql-action v3
github/codeql-action v3
github/codeql-action v3
.github/workflows/site.yaml
actions/checkout v4
actions/setup-java v4
JamesIves/github-pages-deploy-action v4
pom.xml
org.mybatis:mybatis-parent 45
.mvn/wrapper/maven-wrapper.properties
maven 3.9.8
maven-wrapper 3.3.2
So, I wrote xslt snippet .
xsl:text == '' or /xsl:text
/xsl:if
xsl:text == ''/xsl:text/xsl:attribute
xsl:apply-templates/
/xsl:element
/xsl:template
<xsl:template match="isNotEmpty">
<xsl:element name="if">
<xsl:attribute name="test">
<xsl:if test="substring-before(@property, '.')">
<xsl:value-of select="substring-before(@property, '.')" />xsl:text != '' and /xsl:text
/xsl:if
<xsl:value-of select="@property" />xsl:text != ''/xsl:text/xsl:attribute
<xsl:value-of select="@prepend" />
xsl:apply-templates/
/xsl:element
/xsl:template
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.