Dave Jarvis' Repositories

git clone https://repo.autonoma.ca/repo/rxm.git

Open root, root element, and close them.

Author Dave Jarvis <email>
Date 2015-03-07 19:11:42 GMT-0800
Commit d253c1b5def9e9a65df446967fd817ce64bb1e34
Parent 8e416ed
source/java/com/whitemagicsoftware/rxm/tree/xml/RootContext.java
}
+ /**
+ * Returns the value for the XML declaration.
+ *
+ * @return The XML declaration string in SQL/XML.
+ */
protected String getDeclaration() {
return String.format( ", VERSION '%.1f', STANDALONE %s",
getVersion(), isStandalone() ? "YES" : "NO" );
}
+ /**
+ * Returns the XML version number.
+ *
+ * @return 1.0f by default.
+ */
protected float getVersion() {
return 1.0f;
}
+ /**
+ * Indicates the value for STANDALONE.
+ *
+ * @return true STANDALONE is set YES (false is NO).
+ */
protected boolean isStandalone() {
return true;
source/java/com/whitemagicsoftware/rxm/tree/xml/TableMapContext.java
}
+ /**
+ * Opens the XMLELEMENT.
+ */
@Override
public Token getStart() {
- return new Token( "TABLE MAP:" + getParserRuleContext().getText() );
+ QueryParser.ElementContext element = getElementContext();
+ String e = element.getText();
+
+ String s = String.format( ",%s", startElement( e ) );
+ return new Token( s );
}
+ /**
+ * Closes the XMLELEMENT.
+ */
@Override
public Token getStop() {
Delta 26 lines added, 1 line removed, 25-line increase