in src/main/java/org/apache/cxf/cwiki/Page.java [498:543]
public void startElement(String uri, String localName, String qName, Attributes atts)
throws SAXException {
if ("macro".equals(localName) || "structured-macro".equals(localName)) {
String s = atts.getValue(uri, "name");
if ("children".equals(s)) {
state = State.CHILDREN;
} else if ("include".equals(s)) {
state = State.INCLUDE;
} else if ("blog-posts".equals(s)) {
state = State.BLOG_POSTS;
} else if ("code".equals(s)) {
state = State.CODE;
} else if ("snippet".equals(s)) {
state = State.CODE;
} else if ("unmigrated-wiki-markup".equals(s)
|| "unmigrated-inline-wiki-markup".equals(s)) {
if (!unmigrated) {
System.out.println("WARNING: Page \"" + page.title + "\" ("
+ page.spaceKey + ") has unmigrated wiki content.");
unmigrated = true;
//no idea what is in there, lets just turn on the code highlighting
if (page.codeTypes == null) {
page.codeTypes = new ConcurrentSkipListSet<String>();
}
page.codeTypes.add("java");
page.codeTypes.add("xml");
page.codeTypes.add("plain");
}
} else {
//System.out.println("Unknown macro: " + s);
}
params.clear();
paramName = null;
} else if ("parameter".equals(localName)) {
paramName = atts.getValue(uri, "name");
} else if ("default-parameter".equals(localName)) {
paramName = "default-parameter";
} else if ("page".equals(localName) && state == State.INCLUDE) {
for (int x = 0; x < atts.getLength(); x++) {
if (atts.getLocalName(x).equals("content-title")
&& paramName != null) {
params.put(paramName, atts.getValue(x));
}
}
}
}