if (href != null && href.startsWith("#")) {
//for out-of-typesystem objects, there's special handling here
//to keep track of the fact this was an href so we re-serialize
//correctly.
if (this.outOfTypeSystemElement != null) {
XmlElementName elemName = new XmlElementName(nameSpaceURI, localName, qualifiedName);
List<XmlAttribute> ootsAttrs = new ArrayList<XmlAttribute>();
ootsAttrs.add(new XmlAttribute("href", href));
XmlElementNameAndContents elemWithContents = new XmlElementNameAndContents(elemName, null, ootsAttrs);
this.outOfTypeSystemElement.childElements.add(elemWithContents);
}