please see MarkupParserTest.java. The following is a partial copy: @Test public void tagParsing() throws Exception { final MarkupParser parser = new MarkupParser( "This is a test <a componentName:id=\"a\" href=\"foo.html\"> <b componentName:id=\"b\">Bold!</b> " + "<img componentName:id=\"img\" width=9 height=10 src=\"foo\"> <marker componentName:id=\"marker\"/> </a>"); parser.setWicketNamespace("componentName"); ...
@Test public void fileDocument() throws ParseException, ResourceStreamNotFoundException, IOException { IResourceStreamLocator locator = new ResourceStreamLocator(); MarkupResourceStream resource = newMarkupResourceStream(locator, getClass(), "1", null, null, "html"); MarkupParser parser = new MarkupParser(resource); parser.setWicketNamespace("wcn"); IMarkupFragment tokens = parser.parse(); ... -Juergen On Sat, Dec 31, 2011 at 10:05 AM, YK <linux_2...@yahoo.fr> wrote: > Hi, > > > That's right. I'm trying to use another prefix than 'wicket' for my xhtml > components. > > Thanks for the hint! > > By the way, is the following the right way to override the > org.apache.wicket.markup.MarkupResourceStream#getWicketNamespace() method ? > > public class MyWicketApplication extends WebApplication { > > /** Overrode methods */ > @Override > public void init() { > getMarkupSettings().getMarkupFactory().newMarkupParser(new > MyNewMarkupResourceStream());// > } > ... > } > > Thanks again, > > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/overriding-getNamespace-won-t-work-tp4246795p4247940.html > Sent from the Forum for Wicket Core developers mailing list archive at > Nabble.com.