Finally we go the other way around. We create a new document and fill the content via a projection. (Not that it would not be productive to create a website this way, just a demonstration.)
public interface XHTML { @XBWrite ( "/html/@xmlns" ) XHTML setRootNameSpace(String ns); @XBWrite ( "/html/@xml:lang" ) XHTML setRootLang(String lang); @XBWrite ( "/html/head/title" ) XHTML setTitle(String title); @XBWrite ( "/html/body" ) XHTML setBody(String body); } |