Introduce an option to avoid JDom from your components and use the Joomla native JHtml classes. It would reduce the capacities of your component, but the component would be standalone.