namespaces.declarePrefix("gml", GML.NAMESPACE);
namespaces.declarePrefix("xmml", XMMLNS);
namespaces.declarePrefix("xlink", XLINK.NAMESPACE);
visitor = new UnmappingFilterVisitor(mapping);
FilterFactory2 ff = new FilterFactoryImplNamespaceAware(namespaces);
String xpathExpression = "@gml:id";
PropertyName propNameExpression = ff.property(xpathExpression);
List /* <Expression> */unrolled = (List) propNameExpression.accept(visitor, null);
assertNotNull(unrolled);
assertEquals(1, unrolled.size());
assertTrue(unrolled.get(0) instanceof Expression);
assertEquals(((Expression) unrolled.get(0)).toString(), "strConcat([bh.], [BGS_ID])");
xpathExpression = "/@gml:id";
propNameExpression = ff.property(xpathExpression);
unrolled = (List) propNameExpression.accept(visitor, null);
assertNotNull(unrolled);
assertEquals(1, unrolled.size());
assertTrue(unrolled.get(0) instanceof Expression);
assertEquals(((Expression) unrolled.get(0)).toString(), "strConcat([bh.], [BGS_ID])");
xpathExpression = "xmml:Borehole/@gml:id";
propNameExpression = ff.property(xpathExpression);
unrolled = (List) propNameExpression.accept(visitor, null);
assertNotNull(unrolled);
assertEquals(1, unrolled.size());
assertTrue(unrolled.get(0) instanceof Expression);