Moved global attributes to namespace attribute to reflect schema

infoset.
This commit is contained in:
Willem Cazander 2013-08-24 22:04:18 +02:00
parent 4e9052244c
commit 57f3c20655
34 changed files with 958 additions and 1158 deletions

View file

@ -150,8 +150,8 @@ public class EldModuleLoaderCore implements X4OLanguageModuleLoader {
ec.addElementClassAttribute(createElementClassAttribute(language,"bean.class",true,null));
namespace.addElementClass(ec);
ec = createElementClass(language,"attributeHandler",null,BeanElement.class,"Defines generic attribute handler for language.");
ec.addElementParent(CEL_ROOT_URI, "module");
ec = createElementClass(language,"namespaceAttribute",null,BeanElement.class,"Defines generic namespace attribute for language.");
ec.addElementParent(CEL_CORE_URI, "namespace");
ec.addElementClassAttribute(createElementClassAttribute(language,"bean.class",true,null));
namespace.addElementClass(ec);
@ -172,7 +172,7 @@ public class EldModuleLoaderCore implements X4OLanguageModuleLoader {
ec.setSchemaContentBase("string");
ec.addElementParent(CEL_ROOT_URI, "module");
ec.addElementParent(CEL_CORE_URI, "namespace");
ec.addElementParent(CEL_CORE_URI, "attributeHandler");
ec.addElementParent(CEL_CORE_URI, "namespaceAttribute");
ec.addElementParent(CEL_CORE_URI, "bindingHandler");
ec.addElementParent(CEL_CORE_URI, "configurator");
ec.addElementParent(CEL_CORE_URI, "configuratorGlobal");

View file

@ -25,7 +25,6 @@ package org.x4o.xml.eld.lang;
import org.x4o.xml.eld.EldModuleLoader;
import org.x4o.xml.element.AbstractElementBindingHandler;
import org.x4o.xml.element.Element;
import org.x4o.xml.element.ElementAttributeHandler;
import org.x4o.xml.element.ElementBindingHandler;
import org.x4o.xml.element.ElementBindingHandlerException;
import org.x4o.xml.element.ElementConfiguratorGlobal;
@ -51,7 +50,6 @@ public class ElementModuleBindingHandler extends AbstractElementBindingHandler<
ElementInterface.class,
ElementNamespace.class,
ElementBindingHandler.class,
ElementAttributeHandler.class,
ElementConfiguratorGlobal.class,
};
@ -151,11 +149,6 @@ public class ElementModuleBindingHandler extends AbstractElementBindingHandler<
languageModule.addElementBindingHandler(elementBindingHandler);
return;
}
if (childObject instanceof ElementAttributeHandler) {
ElementAttributeHandler elementAttributeHandler = (ElementAttributeHandler)childObject;
languageModule.addElementAttributeHandler(elementAttributeHandler);
return;
}
if (childObject instanceof ElementConfiguratorGlobal) {
ElementConfiguratorGlobal elementConfigurator = (ElementConfiguratorGlobal)childObject;
languageModule.addElementConfiguratorGlobal(elementConfigurator);
@ -176,9 +169,6 @@ public class ElementModuleBindingHandler extends AbstractElementBindingHandler<
for (ElementBindingHandler child:parent.getElementBindingHandlers()) {
createChild(parentElement, child);
}
for (ElementAttributeHandler child:parent.getElementAttributeHandlers()) {
createChild(parentElement, child);
}
for (ElementConfiguratorGlobal child:parent.getElementConfiguratorGlobals()) {
createChild(parentElement, child);
}

View file

@ -27,6 +27,7 @@ import org.x4o.xml.element.Element;
import org.x4o.xml.element.ElementBindingHandlerException;
import org.x4o.xml.element.ElementClass;
import org.x4o.xml.element.ElementNamespace;
import org.x4o.xml.element.ElementNamespaceAttribute;
/**
* ElementNamespaceBindingHandler binds ElementClass into namespace.
@ -37,7 +38,8 @@ import org.x4o.xml.element.ElementNamespace;
public class ElementNamespaceBindingHandler extends AbstractElementBindingHandler<ElementNamespace> {
private final static Class<?>[] CLASSES_CHILD = new Class[] {
ElementClass.class
ElementClass.class,
ElementNamespaceAttribute.class
};
/**
@ -65,6 +67,11 @@ public class ElementNamespaceBindingHandler extends AbstractElementBindingHandle
}
parent.addElementClass(elementClass);
}
if (childObject instanceof ElementNamespaceAttribute) {
ElementNamespaceAttribute elementNamespaceAttribute = (ElementNamespaceAttribute)childObject;
parent.addElementNamespaceAttribute(elementNamespaceAttribute);
return;
}
}
/**
@ -74,5 +81,8 @@ public class ElementNamespaceBindingHandler extends AbstractElementBindingHandle
for (ElementClass child:parent.getElementClasses()) {
createChild(parentElement, child);
}
for (ElementNamespaceAttribute child:parent.getElementNamespaceAttributes()) {
createChild(parentElement, child);
}
}
}

View file

@ -23,7 +23,7 @@
package org.x4o.xml.eld.lang;
import org.x4o.xml.element.AbstractElement;
import org.x4o.xml.element.ElementAttributeHandler;
import org.x4o.xml.element.ElementNamespaceAttribute;
import org.x4o.xml.element.ElementException;
/**
@ -44,8 +44,8 @@ public class NextAttributeElement extends AbstractElement {
if (getParent()==null) {
throw new ElementException("can't be a root tag");
}
if (getParent().getElementObject() instanceof ElementAttributeHandler) {
((ElementAttributeHandler)getParent().getElementObject()).addNextAttribute(param);
if (getParent().getElementObject() instanceof ElementNamespaceAttribute) {
((ElementNamespaceAttribute)getParent().getElementObject()).addNextAttribute(param);
} else {
throw new ElementException("Wrong parent class");
}

View file

@ -32,7 +32,7 @@ import java.util.List;
import java.util.Map;
import java.util.Set;
import org.x4o.xml.element.ElementAttributeHandler;
import org.x4o.xml.element.ElementNamespaceAttribute;
import org.x4o.xml.element.ElementBindingHandler;
import org.x4o.xml.element.ElementClass;
import org.x4o.xml.element.ElementClassAttribute;
@ -288,9 +288,9 @@ public class EldXsdXmlWriter {
writeElementAttribute(null,atts);
}
}
/* TODO: fix xsd namespace attribute printing !!!
for (X4OLanguageModule mod:language.getLanguageModules()) {
for (ElementAttributeHandler eah:mod.getElementAttributeHandlers()) {
for (ElementNamespaceAttribute eah:ns.getElementNamespaceAttributes()) {
attrNames.add(eah.getAttributeName());
atts = new AttributesImpl();
atts.addAttribute ("", "name", "", "", eah.getAttributeName());
@ -298,6 +298,7 @@ public class EldXsdXmlWriter {
writeElementAttribute(eah,atts);
}
}
*/
if (ec.getAutoAttributes()!=null && ec.getAutoAttributes()==false) {
// oke, reverse this if and rm whitespace.

View file

@ -44,9 +44,11 @@ public abstract class AbstractElementNamespace extends AbstractElementMetaBase i
private String schemaResource = null;
private String schemaPrefix = null;
private Boolean languageRoot = null;
private List<ElementNamespaceAttribute> elementNamespaceAttributes = null;
public AbstractElementNamespace() {
elementClasses = new HashMap<String,ElementClass>(100);
elementClasses = new HashMap<String,ElementClass>(60);
elementNamespaceAttributes = new ArrayList<ElementNamespaceAttribute>(5);
}
/**
@ -184,4 +186,20 @@ public abstract class AbstractElementNamespace extends AbstractElementMetaBase i
public void setSchemaPrefix(String schemaPrefix) {
this.schemaPrefix = schemaPrefix;
}
public void addElementNamespaceAttribute(ElementNamespaceAttribute elementNamespaceAttribute) {
if (elementNamespaceAttribute==null) {
throw new NullPointerException("Can't add null object");
}
if (elementNamespaceAttribute.getId()==null) {
throw new NullPointerException("Can't add with null id property.");
}
//logger.finer("Adding elementNamespaceAttribute: "+elementNamespaceAttribute.getAttributeName());
elementNamespaceAttributes.add(elementNamespaceAttribute);
}
public List<ElementNamespaceAttribute> getElementNamespaceAttributes() {
return elementNamespaceAttributes;
}
}

View file

@ -26,18 +26,18 @@ import java.util.ArrayList;
import java.util.List;
/**
* An AbstractElementAttributeHandler.
* An AbstractElementNamespaceAttribute.
*
* @author Willem Cazander
* @version 1.0 Aug 10, 2006
*/
public abstract class AbstractElementAttributeHandler extends AbstractElementConfigurator implements ElementAttributeHandler {
public abstract class AbstractElementNamespaceAttribute extends AbstractElementConfigurator implements ElementNamespaceAttribute {
private String attributeName = null;
private List<String> nextAttributes = new ArrayList<String>(2);
/**
* @see org.x4o.xml.element.ElementAttributeHandler#addNextAttribute(java.lang.String)
* @see org.x4o.xml.element.ElementNamespaceAttribute#addNextAttribute(java.lang.String)
*/
public void addNextAttribute(String attribute) {
if (attribute==null) {
@ -47,7 +47,7 @@ public abstract class AbstractElementAttributeHandler extends AbstractElementCon
}
/**
* @see org.x4o.xml.element.ElementAttributeHandler#removeNextAttribute(java.lang.String)
* @see org.x4o.xml.element.ElementNamespaceAttribute#removeNextAttribute(java.lang.String)
*/
public void removeNextAttribute(String attribute) {
if (attribute==null) {
@ -57,21 +57,21 @@ public abstract class AbstractElementAttributeHandler extends AbstractElementCon
}
/**
* @see org.x4o.xml.element.ElementAttributeHandler#getNextAttributes()
* @see org.x4o.xml.element.ElementNamespaceAttribute#getNextAttributes()
*/
public List<String> getNextAttributes() {
return nextAttributes;
}
/**
* @see org.x4o.xml.element.ElementAttributeHandler#getAttributeName()
* @see org.x4o.xml.element.ElementNamespaceAttribute#getAttributeName()
*/
public String getAttributeName() {
return attributeName;
}
/**
* @see org.x4o.xml.element.ElementAttributeHandler#setAttributeName(java.lang.String)
* @see org.x4o.xml.element.ElementNamespaceAttribute#setAttributeName(java.lang.String)
*/
public void setAttributeName(String attributeName) {
this.attributeName=attributeName;

View file

@ -27,21 +27,21 @@ import java.util.Comparator;
/**
* The DefaultGlobalAttributeHandlerComparator.<br>
* This Comparator compares the NextAttribute names with the attributeName of the ElementAttributeHandlers.<br>
* The DefaultElementNamespaceAttributeComparator.<br>
* This Comparator compares the NextAttribute names with the attributeName of the ElementNamespaceAttribute.<br>
*
* @author Willem Cazander
* @version 1.0 Feb 14, 2007
*/
public class DefaultGlobalAttributeHandlerComparator implements Comparator<ElementAttributeHandler> {
public class DefaultElementNamespaceAttributeComparator implements Comparator<ElementNamespaceAttribute> {
/**
* @param e1 The first ElementAttributeHandler to compare.
* @param e2 The second ElementAttributeHandler to compare.
* @param e1 The first ElementNamespaceAttribute to compare.
* @param e2 The second ElementNamespaceAttribute to compare.
* @return 0 is same.
* @see java.util.Comparator#compare(java.lang.Object, java.lang.Object)
*/
public int compare(ElementAttributeHandler e1, ElementAttributeHandler e2) {
public int compare(ElementNamespaceAttribute e1, ElementNamespaceAttribute e2) {
for (String param:e1.getNextAttributes()) {
if(param.equals(e2.getAttributeName())) {

View file

@ -144,4 +144,16 @@ public interface ElementNamespace extends ElementMetaBase {
* @param schemaPrefix the schemaPrefix to set
*/
void setSchemaPrefix(String schemaPrefix);
/**
* Adds an ElementNamespaceAttribute.
* @param elementNamespaceAttribute Adds an ElementNamespaceAttribute.
*/
void addElementNamespaceAttribute(ElementNamespaceAttribute elementNamespaceAttribute);
/**
* Geta All ElementNamespaceAttributes.
* @return Returns an List of ElementNamespaceAttributes.
*/
List<ElementNamespaceAttribute> getElementNamespaceAttributes();
}

View file

@ -30,7 +30,7 @@ import java.util.List;
* @author Willem Cazander
* @version 1.0 Aug 20, 2005
*/
public interface ElementAttributeHandler extends ElementConfigurator {
public interface ElementNamespaceAttribute extends ElementConfigurator {
/**
* Gets the attribute name this attribute handler handles.
@ -46,7 +46,7 @@ public interface ElementAttributeHandler extends ElementConfigurator {
/**
* Adds an NextAttribute.
* There next attributes will defines the order in which the ElementAttributeHandlers are executed.
* There next attributes will defines the order in which the ElementNamespaceAttribute are executed.
* @param attribute Add attribute which be will processed after this one.
*/
void addNextAttribute(String attribute);

View file

@ -64,7 +64,7 @@ public class DefaultX4OReader<T> extends AbstractX4OReader<T> {
private X4OLanguageSession languageSession = null;
private PropertyConfig propertyConfig;
private final PropertyConfig propertyConfig;
private final static String PROPERTY_CONTEXT_PREFIX = PropertyConfig.X4O_PROPERTIES_PREFIX+PropertyConfig.X4O_PROPERTIES_READER;
private final static String PROPERTY_SAX_ERROR_HANDLER = "sax/error-handler";

View file

@ -59,7 +59,7 @@ import org.xml.sax.helpers.AttributesImpl;
*/
public class DefaultX4OWriter<T> extends AbstractX4OWriter<T> {
private PropertyConfig propertyConfig;
private final PropertyConfig propertyConfig;
private final static String PROPERTY_CONTEXT_PREFIX = PropertyConfig.X4O_PROPERTIES_PREFIX+PropertyConfig.X4O_PROPERTIES_WRITER;
private final static String PROPERTY_OUTPUT_STREAM = "output/stream";

View file

@ -29,7 +29,7 @@ import java.util.Map;
import org.x4o.xml.conv.ObjectConverter;
import org.x4o.xml.element.Element;
import org.x4o.xml.element.ElementAttributeHandler;
import org.x4o.xml.element.ElementNamespaceAttribute;
import org.x4o.xml.element.ElementBindingHandler;
import org.x4o.xml.element.ElementClass;
import org.x4o.xml.element.ElementClassAttribute;
@ -154,7 +154,7 @@ public class X4ODebugWriter {
debugLanguageDefaultClass("getDefaultElementNamespaceInstanceProvider",conf.getDefaultElementNamespaceInstanceProvider());
debugLanguageDefaultClass("getDefaultElementAttributeValueParser",conf.getDefaultElementAttributeValueParser());
debugLanguageDefaultClass("getDefaultElementObjectPropertyValue",conf.getDefaultElementObjectPropertyValue());
debugLanguageDefaultClass("getDefaultElementAttributeHandlerComparator",conf.getDefaultElementAttributeHandlerComparator());
debugLanguageDefaultClass("getDefaultElementNamespaceAttributeComparator",conf.getDefaultElementNamespaceAttributeComparator());
contentWriter.endElement(DEBUG_URI, "X4OLanguageDefaultClasses", "");
} catch (SAXException e) {
@ -230,30 +230,9 @@ public class X4ODebugWriter {
}
contentWriter.startElement (DEBUG_URI, "ElementLanguageModule", "", atts);
//module.getElementAttributeHandlers();
//module.getElementBindingHandlers();
//module.getGlobalElementConfigurators();
//module.getElementInterfaces();
//module.getElementNamespace();
debugElementConfiguratorGlobal(module.getElementConfiguratorGlobals());
debugElementBindingHandler(module.getElementBindingHandlers());
for (ElementAttributeHandler p:module.getElementAttributeHandlers()) {
atts = new AttributesImpl();
atts.addAttribute ("", "attributeName", "", "", p.getAttributeName());
atts.addAttribute ("", "description", "", "", p.getDescription());
atts.addAttribute ("", "className", "", "", p.getClass().getName());
contentWriter.startElement (DEBUG_URI, "elementAttributeHandler", "", atts);
for (String para:p.getNextAttributes()) {
atts = new AttributesImpl();
atts.addAttribute ("", "attributeName", "", "", para);
contentWriter.startElement (DEBUG_URI, "nextAttribute", "", atts);
contentWriter.endElement(DEBUG_URI, "nextAttribute", "");
}
contentWriter.endElement(DEBUG_URI, "elementAttributeHandler", "");
}
for (ElementInterface elementInterface:module.getElementInterfaces()) {
atts = new AttributesImpl();
atts.addAttribute ("", "className", "", "", elementInterface.getClass().getName());
@ -274,6 +253,21 @@ public class X4ODebugWriter {
atts.addAttribute ("", "className", "", "", enc.getClass().getName());
contentWriter.startElement (DEBUG_URI, ElementNamespace.class.getSimpleName(), "", atts);
for (ElementNamespaceAttribute p:enc.getElementNamespaceAttributes()) {
atts = new AttributesImpl();
atts.addAttribute ("", "attributeName", "", "", p.getAttributeName());
atts.addAttribute ("", "description", "", "", p.getDescription());
atts.addAttribute ("", "className", "", "", p.getClass().getName());
contentWriter.startElement (DEBUG_URI, "elementNamespaceAttribute", "", atts);
for (String para:p.getNextAttributes()) {
atts = new AttributesImpl();
atts.addAttribute ("", "attributeName", "", "", para);
contentWriter.startElement (DEBUG_URI, "nextAttribute", "", atts);
contentWriter.endElement(DEBUG_URI, "nextAttribute", "");
}
contentWriter.endElement(DEBUG_URI, "elementNamespaceAttribute", "");
}
for (ElementClass ec:enc.getElementClasses()) {
debugElementClass(ec);
}

View file

@ -46,7 +46,7 @@ public abstract class AbstractX4OLanguageConfiguration implements X4OLanguageCon
private Class<?> defaultElementNamespaceInstanceProvider = null;
private Class<?> defaultElementAttributeValueParser = null;
private Class<?> defaultElementObjectPropertyValue = null;
private Class<?> defaultElementAttributeHandlerComparator = null;
private Class<?> defaultElementNamespaceAttributeComparator = null;
private Class<?> defaultLanguageVersionFilter = null;
private Class<?> defaultLanguageLoader = null;
@ -255,17 +255,17 @@ public abstract class AbstractX4OLanguageConfiguration implements X4OLanguageCon
}
/**
* @return the defaultElementAttributeHandlerComparator
* @return the defaultElementNamespaceAttributeComparator
*/
public Class<?> getDefaultElementAttributeHandlerComparator() {
return defaultElementAttributeHandlerComparator;
public Class<?> getDefaultElementNamespaceAttributeComparator() {
return defaultElementNamespaceAttributeComparator;
}
/**
* @param defaultElementAttributeHandlerComparator the defaultElementAttributeHandlerComparator to set
* @param defaultElementNamespaceAttributeComparator the defaultElementNamespaceAttributeComparator to set
*/
public void setDefaultElementAttributeHandlerComparator(Class<?> defaultElementAttributeHandlerComparator) {
this.defaultElementAttributeHandlerComparator = defaultElementAttributeHandlerComparator;
public void setDefaultElementNamespaceAttributeComparator(Class<?> defaultElementNamespaceAttributeComparator) {
this.defaultElementNamespaceAttributeComparator = defaultElementNamespaceAttributeComparator;
}
/**

View file

@ -29,7 +29,6 @@ import java.util.ArrayList;
import java.util.logging.Logger;
import org.x4o.xml.element.AbstractElementMetaBase;
import org.x4o.xml.element.ElementAttributeHandler;
import org.x4o.xml.element.ElementBindingHandler;
import org.x4o.xml.element.ElementConfiguratorGlobal;
import org.x4o.xml.element.ElementInterface;
@ -48,7 +47,6 @@ public abstract class AbstractX4OLanguageModule extends AbstractElementMetaBase
private String providerHost=null;
private String sourceResource = null;
private List<ElementAttributeHandler> elementAttributeHandlers = null;
private List<ElementBindingHandler> elementBindingHandlers = null;
private List<ElementConfiguratorGlobal> elementConfiguratorGlobals = null;
private List<ElementInterface> elementInterfaces = null;
@ -61,7 +59,6 @@ public abstract class AbstractX4OLanguageModule extends AbstractElementMetaBase
public AbstractX4OLanguageModule() {
logger = Logger.getLogger(AbstractX4OLanguageSession.class.getName());
logger.finest("Creating new ParsingContext");
elementAttributeHandlers = new ArrayList<ElementAttributeHandler>(4);
elementBindingHandlers = new ArrayList<ElementBindingHandler>(4);
elementConfiguratorGlobals = new ArrayList<ElementConfiguratorGlobal>(4);
elementInterfaces = new ArrayList<ElementInterface>(20);
@ -96,27 +93,6 @@ public abstract class AbstractX4OLanguageModule extends AbstractElementMetaBase
this.providerHost = providerHost;
}
/**
* @see org.x4o.xml.lang.X4OLanguageModule#addElementAttributeHandler(ElementAttributeHandler)
*/
public void addElementAttributeHandler(ElementAttributeHandler elementAttributeHandler) {
if (elementAttributeHandler==null) {
throw new NullPointerException("Can't add null object");
}
if (elementAttributeHandler.getId()==null) {
throw new NullPointerException("Can't add with null id property.");
}
logger.finer("Adding ElementAttributeHandler: "+elementAttributeHandler.getAttributeName());
elementAttributeHandlers.add(elementAttributeHandler);
}
/**
* @see org.x4o.xml.lang.X4OLanguageModule#getElementAttributeHandlers()
*/
public List<ElementAttributeHandler> getElementAttributeHandlers() {
return elementAttributeHandlers;
}
/**
* @see org.x4o.xml.lang.X4OLanguageModule#addElementBindingHandler(ElementBindingHandler)
*/
@ -249,7 +225,6 @@ public abstract class AbstractX4OLanguageModule extends AbstractElementMetaBase
* Reloads the module, experiment !!
*/
public void reloadModule(X4OLanguageLocal elementLanguage,X4OLanguageModule elementLanguageModule) throws X4OLanguageModuleLoaderException {
elementAttributeHandlers.clear();
elementBindingHandlers.clear();
elementInterfaces.clear();
elementNamespaces.clear();

View file

@ -38,7 +38,7 @@ import org.x4o.xml.element.DefaultElementInterface;
import org.x4o.xml.element.DefaultElementNamespace;
import org.x4o.xml.element.DefaultElementNamespaceInstanceProvider;
import org.x4o.xml.element.DefaultElementObjectPropertyValue;
import org.x4o.xml.element.DefaultGlobalAttributeHandlerComparator;
import org.x4o.xml.element.DefaultElementNamespaceAttributeComparator;
/**
* Provides all implementions of the different parts of the language parser.
@ -69,7 +69,7 @@ public class DefaultX4OLanguageConfiguration extends AbstractX4OLanguageConfigur
if (getDefaultElementNamespaceInstanceProvider()==null) { setDefaultElementNamespaceInstanceProvider( DefaultElementNamespaceInstanceProvider.class); }
if (getDefaultElementAttributeValueParser()==null) { setDefaultElementAttributeValueParser( DefaultElementAttributeValueParser.class); }
if (getDefaultElementObjectPropertyValue()==null) { setDefaultElementObjectPropertyValue( DefaultElementObjectPropertyValue.class); }
if (getDefaultElementAttributeHandlerComparator()==null) { setDefaultElementAttributeHandlerComparator( DefaultGlobalAttributeHandlerComparator.class); }
if (getDefaultElementNamespaceAttributeComparator()==null){ setDefaultElementNamespaceAttributeComparator( DefaultElementNamespaceAttributeComparator.class); }
if (getDefaultLanguageVersionFilter()==null) { setDefaultLanguageVersionFilter( DefaultX4OLanguageVersionFilter.class); }
if (getDefaultLanguageLoader()==null) { setDefaultLanguageLoader( DefaultX4OLanguageLoader.class); }
if (getDefaultExpressionLanguageContext()==null) { setDefaultExpressionLanguageContext( X4OELContext.class); }

View file

@ -61,7 +61,7 @@ public interface X4OLanguageConfiguration {
Class<?> getDefaultElementNamespaceInstanceProvider();
Class<?> getDefaultElementAttributeValueParser();
Class<?> getDefaultElementObjectPropertyValue();
Class<?> getDefaultElementAttributeHandlerComparator();
Class<?> getDefaultElementNamespaceAttributeComparator();
/**
* @return Returns the X4OLanguageVersionFilter which filters the best version to use.

View file

@ -48,7 +48,7 @@ public interface X4OLanguageConfigurationLocal extends X4OLanguageConfiguration
void setDefaultElementNamespaceInstanceProvider(Class<?> value);
void setDefaultElementAttributeValueParser(Class<?> value);
void setDefaultElementObjectPropertyValue(Class<?> value);
void setDefaultElementAttributeHandlerComparator(Class<?> value);
void setDefaultElementNamespaceAttributeComparator(Class<?> value);
void setDefaultLanguageVersionFilter(Class<?> value);
void setDefaultLanguageLoader(Class<?> value);

View file

@ -24,7 +24,6 @@ package org.x4o.xml.lang;
import java.util.List;
import org.x4o.xml.element.ElementAttributeHandler;
import org.x4o.xml.element.ElementBindingHandler;
import org.x4o.xml.element.ElementConfiguratorGlobal;
import org.x4o.xml.element.ElementInterface;
@ -60,18 +59,6 @@ public interface X4OLanguageModule extends ElementMetaBase {
*/
void setProviderHost(String providerHost);
/**
* Adds an ElementAttributeHandler.
* @param elementAttributeHandler Adds an ElmentAttributeHandler.
*/
void addElementAttributeHandler(ElementAttributeHandler elementAttributeHandler);
/**
* Geta All ElementAttributeHandlers.
* @return Returns an List of ElementAttributeHandlers.
*/
List<ElementAttributeHandler> getElementAttributeHandlers();
/**
* Adds an ElementBindingHanlder.
* @param elementBindingHandler The ElementBindingHandler to add.

View file

@ -31,7 +31,7 @@ import java.util.logging.Logger;
import org.x4o.xml.conv.ObjectConverterException;
import org.x4o.xml.element.Element;
import org.x4o.xml.element.ElementAttributeHandler;
import org.x4o.xml.element.ElementNamespaceAttribute;
import org.x4o.xml.element.ElementAttributeValueParser;
import org.x4o.xml.element.ElementBindingHandler;
import org.x4o.xml.element.ElementClass;
@ -263,7 +263,7 @@ public class X4OPhaseLanguageRead {
* X4OPhaseReadConfigGlobalAttribute
*/
class X4OPhaseReadConfigGlobalAttribute extends AbstractX4OPhase {
Comparator<ElementAttributeHandler> elementAttributeHandlerComparator = null;
Comparator<ElementNamespaceAttribute> elementNamespaceAttributeComparator = null;
private X4OPhaseReadRunConfigurator runConf = null;
public X4OPhaseReadConfigGlobalAttribute(X4OPhaseReadRunConfigurator runConf) {
this.runConf=runConf;
@ -279,9 +279,9 @@ public class X4OPhaseLanguageRead {
}
@SuppressWarnings("unchecked")
public void runElementPhase(Element element) throws X4OPhaseException {
if (elementAttributeHandlerComparator==null) {
if (elementNamespaceAttributeComparator==null) {
try {
elementAttributeHandlerComparator = (Comparator<ElementAttributeHandler>)X4OLanguageClassLoader.newInstance(element.getLanguageSession().getLanguage().getLanguageConfiguration().getDefaultElementAttributeHandlerComparator());
elementNamespaceAttributeComparator = (Comparator<ElementNamespaceAttribute>)X4OLanguageClassLoader.newInstance(element.getLanguageSession().getLanguage().getLanguageConfiguration().getDefaultElementNamespaceAttributeComparator());
} catch (Exception e) {
throw new X4OPhaseException(this,e);
}
@ -289,17 +289,18 @@ public class X4OPhaseLanguageRead {
// do global parameters
logger.finest("Do Element Global AttributeHandlers.");
List<ElementAttributeHandler> handlers = new ArrayList<ElementAttributeHandler>();
List<ElementNamespaceAttribute> handlers = new ArrayList<ElementNamespaceAttribute>();
for (X4OLanguageModule mod:element.getLanguageSession().getLanguage().getLanguageModules()) {
for (ElementAttributeHandler global:mod.getElementAttributeHandlers()) {
String attribute = element.getAttributes().get(global.getAttributeName());
if (attribute!=null) {
handlers.add(global);
for (ElementNamespace ns:mod.getElementNamespaces()) {
for (ElementNamespaceAttribute global:ns.getElementNamespaceAttributes()) {
String attribute = element.getAttributes().get(global.getAttributeName());
if (attribute!=null) {
handlers.add(global);
}
}
}
}
Collections.sort(handlers,elementAttributeHandlerComparator);
Collections.sort(handlers,elementNamespaceAttributeComparator);
List<ElementConfigurator> handlers2 = new ArrayList<ElementConfigurator>(handlers.size());
handlers2.addAll(handlers);
for (ElementConfigurator ec:handlers) {

View file

@ -1,55 +1,63 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2004-2013, Willem Cazander
All rights reserved.
<!-- ==================================================================== -->
Redistribution and use in source and binary forms, with or without modification, are permitted provided
that the following conditions are met:
<!-- ===== Automatic generated schema for language: cel ===== -->
* Redistributions of source code must retain the above copyright notice, this list of conditions and the
following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
the following disclaimer in the documentation and/or other materials provided with the distribution.
<!-- ==================================================================== -->
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-->
<!-- ==================================================================== -->
<!-- ===== Automatic generated schema for language: cel ===== -->
<!-- ==================================================================== -->
<!--
ID: cel-module
ProviderName: Core Element Languag Module
ProviderHost: cel.x4o.org
ProviderHost: cel.x4o.org
Namespaces: 2
Namespace: http://cel.x4o.org/xml/ns/cel-core
Created on: Sun Apr 28 11:41:33 CEST 2013
-->
Uri: http://cel.x4o.org/xml/ns/cel-core
Uri schema: http://cel.x4o.org/xml/ns/cel-core-1.0.xsd
Created on: Sat Aug 24 22:02:08 CEST 2013
-->
<schema xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:this="http://cel.x4o.org/xml/ns/cel-core"
version="1.0" elementFormDefault="qualified" attributeFormDefault="unqualified" targetNamespace="http://cel.x4o.org/xml/ns/cel-core">
<complexType name="attributeType">
<choice minOccurs="0" maxOccurs="unbounded">
<element name="attributeAlias" type="this:attributeAliasType"/>
<element name="classConverter" type="this:classConverterType"/>
<element name="description" type="this:descriptionType"/>
</choice>
<attribute name="required" type="boolean"/>
<attribute name="defaultValue" type="string"/>
<attribute name="runResolveEL" type="boolean"/>
<attribute name="runConverters" type="boolean"/>
<attribute name="objectConverter" type="string"/>
<attribute name="runBeanValue" type="boolean"/>
<attribute name="writeOrder" type="integer"/>
<attribute name="description" type="string"/>
<attribute name="id" type="string"/>
</complexType>
<complexType name="classConverterType">
<choice minOccurs="0" maxOccurs="unbounded"/>
</complexType>
<complexType name="namespaceAttributeType">
<choice minOccurs="0" maxOccurs="unbounded">
<element name="description" type="this:descriptionType"/>
</choice>
<attribute name="bean.class" type="string" use="required"/>
<anyAttribute/>
</complexType>
<complexType name="namespaceType">
<choice minOccurs="0" maxOccurs="unbounded">
<element name="description" type="this:descriptionType"/>
<element name="element" type="this:elementType"/>
<element name="namespaceAttribute" type="this:namespaceAttributeType"/>
</choice>
<attribute name="uri" type="string" use="required"/>
<attribute name="name" type="string"/>
<attribute name="languageRoot" type="boolean"/>
<attribute name="prefixMapping" type="string"/>
<attribute name="elementNamespaceInstanceProvider" type="string"/>
<attribute name="schemaUri" type="string"/>
<attribute name="schemaResource" type="string"/>
<attribute name="languageRoot" type="boolean"/>
<attribute name="schemaPrefix" type="string"/>
<attribute name="elementNamespaceInstanceProvider" type="string"/>
<attribute name="prefixMapping" type="string"/>
<attribute name="description" type="string"/>
<attribute name="id" type="string"/>
</complexType>
@ -60,6 +68,14 @@
</extension>
</simpleContent>
</complexType>
<complexType name="bindingHandlerType">
<choice minOccurs="0" maxOccurs="unbounded">
<element name="description" type="this:descriptionType"/>
</choice>
<attribute name="id" type="string" use="required"/>
<attribute name="bean.class" type="string" use="required"/>
<anyAttribute/>
</complexType>
<complexType name="elementType">
<choice minOccurs="0" maxOccurs="unbounded">
<element name="attribute" type="this:attributeType"/>
@ -69,10 +85,10 @@
</choice>
<attribute name="objectClass" type="string"/>
<attribute name="elementClass" type="string"/>
<attribute name="autoAttributes" type="boolean"/>
<attribute name="schemaContentBase" type="string"/>
<attribute name="schemaContentComplex" type="boolean"/>
<attribute name="schemaContentMixed" type="boolean"/>
<attribute name="schemaContentBase" type="string"/>
<attribute name="autoAttributes" type="boolean"/>
<attribute name="description" type="string"/>
<attribute name="id" type="string"/>
</complexType>
@ -97,45 +113,9 @@
<attribute name="configAction" type="string"/>
<anyAttribute/>
</complexType>
<complexType name="attributeHandlerType">
<choice minOccurs="0" maxOccurs="unbounded">
<element name="description" type="this:descriptionType"/>
</choice>
<attribute name="bean.class" type="string" use="required"/>
<anyAttribute/>
</complexType>
<complexType name="attributeType">
<choice minOccurs="0" maxOccurs="unbounded">
<element name="attributeAlias" type="this:attributeAliasType"/>
<element name="classConverter" type="this:classConverterType"/>
<element name="description" type="this:descriptionType"/>
</choice>
<attribute name="name" type="string"/>
<attribute name="runBeanValue" type="boolean"/>
<attribute name="runResolveEL" type="boolean"/>
<attribute name="writeOrder" type="integer"/>
<attribute name="objectConverter" type="string"/>
<attribute name="runConverters" type="boolean"/>
<attribute name="required" type="boolean"/>
<attribute name="defaultValue" type="string"/>
<attribute name="description" type="string"/>
<attribute name="id" type="string"/>
</complexType>
<complexType name="classConverterType">
<choice minOccurs="0" maxOccurs="unbounded"/>
</complexType>
<complexType name="bindingHandlerType">
<choice minOccurs="0" maxOccurs="unbounded">
<element name="description" type="this:descriptionType"/>
</choice>
<attribute name="id" type="string" use="required"/>
<attribute name="bean.class" type="string" use="required"/>
<anyAttribute/>
</complexType>
<complexType name="elementInterfaceType">
<choice minOccurs="0" maxOccurs="unbounded">
<element name="attribute" type="this:attributeType"/>
<element name="bindingHandler" type="this:bindingHandlerType"/>
<element name="configurator" type="this:configuratorType"/>
<element name="description" type="this:descriptionType"/>
<element name="elementParent" type="this:elementParentType"/>
@ -150,76 +130,64 @@
<attribute name="uri" type="string"/>
<anyAttribute/>
</complexType>
<element name="namespace" type="this:namespaceType">
<annotation>
<documentation xml:lang="en">Defines an xml namespace.
</documentation>
</annotation>
</element>
<element name="description" type="this:descriptionType">
<annotation>
<documentation xml:lang="en">Adds description as text on all eld elements.
</documentation>
</annotation>
</element>
<element name="element" type="this:elementType">
<annotation>
<documentation xml:lang="en">Defines xml element tag.
</documentation>
</annotation>
</element>
<element name="configuratorGlobal" type="this:configuratorGlobalType">
<annotation>
<documentation xml:lang="en">Define generic global configuator for languge.
</documentation>
</annotation>
</element>
<element name="attributeAlias" type="this:attributeAliasType">
<annotation>
<documentation xml:lang="en">Adds an attribute alias.
</documentation>
</annotation>
</element>
<element name="configurator" type="this:configuratorType">
<annotation>
<documentation xml:lang="en">Define generic configurator for language.
</documentation>
</annotation>
</element>
<element name="attributeHandler" type="this:attributeHandlerType">
<annotation>
<documentation xml:lang="en">Defines generic attribute handler for language.
</documentation>
</annotation>
</element>
<element name="attribute" type="this:attributeType">
<annotation>
<documentation xml:lang="en">Defines xml element attribute.
</documentation>
<documentation xml:lang="en">Defines xml element attribute.</documentation>
</annotation>
</element>
<element name="classConverter" type="this:classConverterType">
<annotation>
<documentation xml:lang="en">Converts string attribute to java class instance.
</documentation>
<documentation xml:lang="en">Converts string attribute to java class instance.</documentation>
</annotation>
</element>
<element name="namespaceAttribute" type="this:namespaceAttributeType">
<annotation>
<documentation xml:lang="en">Defines generic namespace attribute for language.</documentation>
</annotation>
</element>
<element name="namespace" type="this:namespaceType">
<annotation>
<documentation xml:lang="en">Defines an xml namespace.</documentation>
</annotation>
</element>
<element name="description" type="this:descriptionType">
<annotation>
<documentation xml:lang="en">Adds description as text on all eld elements.</documentation>
</annotation>
</element>
<element name="bindingHandler" type="this:bindingHandlerType">
<annotation>
<documentation xml:lang="en">Defines generic binding handler for languge.
</documentation>
<documentation xml:lang="en">Defines generic binding handler for languge.</documentation>
</annotation>
</element>
<element name="element" type="this:elementType">
<annotation>
<documentation xml:lang="en">Defines xml element tag.</documentation>
</annotation>
</element>
<element name="configuratorGlobal" type="this:configuratorGlobalType">
<annotation>
<documentation xml:lang="en">Define generic global configuator for languge.</documentation>
</annotation>
</element>
<element name="attributeAlias" type="this:attributeAliasType">
<annotation>
<documentation xml:lang="en">Adds an attribute alias.</documentation>
</annotation>
</element>
<element name="configurator" type="this:configuratorType">
<annotation>
<documentation xml:lang="en">Define generic configurator for language.</documentation>
</annotation>
</element>
<element name="elementInterface" type="this:elementInterfaceType">
<annotation>
<documentation xml:lang="en">Defines element interface class.
</documentation>
<documentation xml:lang="en">Defines element interface class.</documentation>
</annotation>
</element>
<element name="elementParent" type="this:elementParentType">
<annotation>
<documentation xml:lang="en">Added (meta) element parent.
</documentation>
<documentation xml:lang="en">Added (meta) element parent.</documentation>
</annotation>
</element>
</schema>

View file

@ -1,39 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2004-2013, Willem Cazander
All rights reserved.
<!-- ==================================================================== -->
Redistribution and use in source and binary forms, with or without modification, are permitted provided
that the following conditions are met:
<!-- ===== Automatic generated schema for language: cel ===== -->
* Redistributions of source code must retain the above copyright notice, this list of conditions and the
following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
the following disclaimer in the documentation and/or other materials provided with the distribution.
<!-- ==================================================================== -->
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-->
<!-- ==================================================================== -->
<!-- ===== Automatic generated schema for language: cel ===== -->
<!-- ==================================================================== -->
<!--
ID: cel-module
ProviderName: Core Element Languag Module
ProviderHost: cel.x4o.org
ProviderHost: cel.x4o.org
Namespaces: 2
Namespace: http://cel.x4o.org/xml/ns/cel-root
Created on: Sun Apr 28 11:41:33 CEST 2013
-->
Uri: http://cel.x4o.org/xml/ns/cel-root
Uri schema: http://cel.x4o.org/xml/ns/cel-root-1.0.xsd
Created on: Sat Aug 24 22:02:08 CEST 2013
-->
<schema xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:cel-core="http://cel.x4o.org/xml/ns/cel-core"
version="1.0" elementFormDefault="qualified" attributeFormDefault="unqualified" targetNamespace="http://cel.x4o.org/xml/ns/cel-root">
@ -41,7 +22,6 @@
<element name="module">
<complexType>
<choice minOccurs="0" maxOccurs="unbounded">
<element ref="cel-core:attributeHandler"/>
<element ref="cel-core:bindingHandler"/>
<element ref="cel-core:configuratorGlobal"/>
<element ref="cel-core:description"/>
@ -50,8 +30,8 @@
</choice>
<attribute name="id" type="string" use="required"/>
<attribute name="providerHost" type="string" use="required"/>
<attribute name="sourceResource" type="string"/>
<attribute name="languageModuleLoader" type="string"/>
<attribute name="sourceResource" type="string"/>
<attribute name="providerName" type="string"/>
<attribute name="description" type="string"/>
</complexType>

View file

@ -1,31 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2004-2013, Willem Cazander
All rights reserved.
<!-- ==================================================================== -->
Redistribution and use in source and binary forms, with or without modification, are permitted provided
that the following conditions are met:
<!-- ===== Automatic generated schema for language: eld ===== -->
* Redistributions of source code must retain the above copyright notice, this list of conditions and the
following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
the following disclaimer in the documentation and/or other materials provided with the distribution.
<!-- ==================================================================== -->
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-->
<!-- ==================================================================== -->
<!-- ===== Automatic generated schema for language: eld ===== -->
<!-- ==================================================================== -->
<!--
ID: eld-module
ProviderName: Element Language Definition
@ -33,8 +13,8 @@
Namespaces: 3
Uri: http://eld.x4o.org/xml/ns/eld-conv
Uri schema: http://eld.x4o.org/xml/ns/eld-conv-0.8.xsd
Created on: Sun Apr 28 11:56:32 CEST 2013
-->
Created on: Sat Aug 24 21:57:18 CEST 2013
-->
<schema xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:this="http://eld.x4o.org/xml/ns/eld-conv"
xmlns:lang="http://eld.x4o.org/xml/ns/eld-lang"
@ -43,18 +23,59 @@
<complexType name="byteConverterType">
<choice minOccurs="0" maxOccurs="unbounded"/>
</complexType>
<complexType name="doubleConverterType">
<choice minOccurs="0" maxOccurs="unbounded"/>
</complexType>
<complexType name="longConverterType">
<choice minOccurs="0" maxOccurs="unbounded"/>
</complexType>
<complexType name="classConverterType">
<choice minOccurs="0" maxOccurs="unbounded"/>
</complexType>
<complexType name="stringSplitConverterType">
<choice minOccurs="0" maxOccurs="unbounded">
<element name="stringSplitConverterStep" type="this:stringSplitConverterStepType"/>
</choice>
<attribute name="useNativeType" type="string">
<annotation>
<documentation xml:lang="en">Set to true to convert to native data type.</documentation>
</annotation>
</attribute>
<attribute name="singleToMethod" type="string">
<annotation>
<documentation xml:lang="en">Shortcut to use only this method for the &apos;to&apos; convert.</documentation>
</annotation>
</attribute>
<attribute name="splitSize" type="string" use="required">
<annotation>
<documentation xml:lang="en">The split value expected size.</documentation>
</annotation>
</attribute>
<attribute name="split" type="string" use="required">
<annotation>
<documentation xml:lang="en">The split regex.</documentation>
</annotation>
</attribute>
<attribute name="classTo" type="string" use="required">
<annotation>
<documentation xml:lang="en">The class name to convert the string to.</documentation>
</annotation>
</attribute>
</complexType>
<complexType name="booleanConverterType">
<choice minOccurs="0" maxOccurs="unbounded"/>
</complexType>
<complexType name="urlConverterType">
<choice minOccurs="0" maxOccurs="unbounded"/>
</complexType>
<complexType name="integerConverterType">
<choice minOccurs="0" maxOccurs="unbounded"/>
</complexType>
<complexType name="beanConverterType">
<choice minOccurs="0" maxOccurs="unbounded"/>
<attribute name="bean.class" type="string">
<annotation>
<documentation xml:lang="en">The class name of the converter to load.
</documentation>
<documentation xml:lang="en">The class name of the converter to load.</documentation>
</annotation>
</attribute>
<anyAttribute/>
@ -75,77 +96,26 @@
</choice>
<attribute name="toMethod" type="string">
<annotation>
<documentation xml:lang="en">The convert 'to' method step.
</documentation>
<documentation xml:lang="en">The convert &apos;to&apos; method step.</documentation>
</annotation>
</attribute>
<attribute name="fromOrder" type="string" use="required">
<annotation>
<documentation xml:lang="en">The convert 'from' order.
</documentation>
<documentation xml:lang="en">The convert &apos;from&apos; order.</documentation>
</annotation>
</attribute>
<attribute name="fromMethod" type="string" use="required">
<annotation>
<documentation xml:lang="en">The convert 'from' method step.
</documentation>
<documentation xml:lang="en">The convert &apos;from&apos; method step.</documentation>
</annotation>
</attribute>
<attribute name="toOrder" type="string" use="required">
<annotation>
<documentation xml:lang="en">The convert 'to' order.
</documentation>
<documentation xml:lang="en">The convert &apos;to&apos; order.</documentation>
</annotation>
</attribute>
<attribute name="objectConverter" type="string"/>
</complexType>
<complexType name="doubleConverterType">
<choice minOccurs="0" maxOccurs="unbounded"/>
</complexType>
<complexType name="longConverterType">
<choice minOccurs="0" maxOccurs="unbounded"/>
</complexType>
<complexType name="classConverterType">
<choice minOccurs="0" maxOccurs="unbounded"/>
</complexType>
<complexType name="stringSplitConverterType">
<choice minOccurs="0" maxOccurs="unbounded">
<element name="stringSplitConverterStep" type="this:stringSplitConverterStepType"/>
</choice>
<attribute name="useNativeType" type="string">
<annotation>
<documentation xml:lang="en">Set to true to convert to native data type.
</documentation>
</annotation>
</attribute>
<attribute name="singleToMethod" type="string">
<annotation>
<documentation xml:lang="en">Shortcut to use only this method for the 'to' convert.
</documentation>
</annotation>
</attribute>
<attribute name="splitSize" type="string" use="required">
<annotation>
<documentation xml:lang="en">The split value expected size.
</documentation>
</annotation>
</attribute>
<attribute name="split" type="string" use="required">
<annotation>
<documentation xml:lang="en">The split regex.
</documentation>
</annotation>
</attribute>
<attribute name="classTo" type="string" use="required">
<annotation>
<documentation xml:lang="en">The class name to convert the string to.
</documentation>
</annotation>
</attribute>
</complexType>
<complexType name="integerConverterType">
<choice minOccurs="0" maxOccurs="unbounded"/>
</complexType>
<complexType name="floatConverterType">
<choice minOccurs="0" maxOccurs="unbounded"/>
</complexType>
@ -157,20 +127,19 @@
<attribute name="enumClass" type="string"/>
</complexType>
<element name="byteConverter" type="this:byteConverterType"/>
<element name="booleanConverter" type="this:booleanConverterType"/>
<element name="urlConverter" type="this:urlConverterType"/>
<element name="beanConverter" type="this:beanConverterType">
<annotation>
<documentation xml:lang="en">Define an loadable in bean.class for an ObjectConverter.
</documentation>
</annotation>
</element>
<element name="stringSplitConverterStep" type="this:stringSplitConverterStepType"/>
<element name="doubleConverter" type="this:doubleConverterType"/>
<element name="longConverter" type="this:longConverterType"/>
<element name="classConverter" type="this:classConverterType"/>
<element name="stringSplitConverter" type="this:stringSplitConverterType"/>
<element name="booleanConverter" type="this:booleanConverterType"/>
<element name="urlConverter" type="this:urlConverterType"/>
<element name="integerConverter" type="this:integerConverterType"/>
<element name="beanConverter" type="this:beanConverterType">
<annotation>
<documentation xml:lang="en">Define an loadable in bean.class for an ObjectConverter.</documentation>
</annotation>
</element>
<element name="stringSplitConverterStep" type="this:stringSplitConverterStepType"/>
<element name="floatConverter" type="this:floatConverterType"/>
<element name="characterConverter" type="this:characterConverterType"/>
<element name="enumConverter" type="this:enumConverterType"/>

View file

@ -1,31 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2004-2013, Willem Cazander
All rights reserved.
<!-- ==================================================================== -->
Redistribution and use in source and binary forms, with or without modification, are permitted provided
that the following conditions are met:
<!-- ===== Automatic generated schema for language: eld ===== -->
* Redistributions of source code must retain the above copyright notice, this list of conditions and the
following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
the following disclaimer in the documentation and/or other materials provided with the distribution.
<!-- ==================================================================== -->
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-->
<!-- ==================================================================== -->
<!-- ===== Automatic generated schema for language: eld ===== -->
<!-- ==================================================================== -->
<!--
ID: eld-module
ProviderName: Element Language Definition
@ -33,202 +13,13 @@
Namespaces: 3
Uri: http://eld.x4o.org/xml/ns/eld-lang
Uri schema: http://eld.x4o.org/xml/ns/eld-lang-0.8.xsd
Created on: Sun Apr 28 11:56:32 CEST 2013
-->
Created on: Sat Aug 24 21:57:18 CEST 2013
-->
<schema xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:conv="http://eld.x4o.org/xml/ns/eld-conv"
xmlns:this="http://eld.x4o.org/xml/ns/eld-lang"
version="1.0" elementFormDefault="qualified" attributeFormDefault="unqualified" targetNamespace="http://eld.x4o.org/xml/ns/eld-lang">
<import namespace="http://eld.x4o.org/xml/ns/eld-conv" schemaLocation="eld-conv-1.0.xsd"/>
<complexType name="namespaceType">
<choice minOccurs="0" maxOccurs="unbounded">
<element name="description" type="this:descriptionType"/>
<element name="element" type="this:elementType"/>
</choice>
<attribute name="id" type="string" use="required">
<annotation>
<documentation xml:lang="en">The namespace id.
</documentation>
</annotation>
</attribute>
<attribute name="name" type="string"/>
<attribute name="elementNamespaceInstanceProvider" type="string"/>
<attribute name="uri" type="string"/>
<attribute name="schemaUri" type="string"/>
<attribute name="schemaResource" type="string"/>
<attribute name="schemaPrefix" type="string"/>
<attribute name="prefixMapping" type="string"/>
<attribute name="languageRoot" type="boolean"/>
<attribute name="description" type="string"/>
</complexType>
<complexType name="descriptionType">
<simpleContent>
<extension base="string">
<anyAttribute/>
</extension>
</simpleContent>
</complexType>
<complexType name="elementSkipPhaseType">
<choice minOccurs="0" maxOccurs="unbounded"/>
<attribute name="name" type="string" use="required">
<annotation>
<documentation xml:lang="en">The name of the phase to skip.
</documentation>
</annotation>
</attribute>
<anyAttribute/>
</complexType>
<complexType name="elementType">
<choice minOccurs="0" maxOccurs="unbounded">
<element name="attribute" type="this:attributeType"/>
<element name="attributeFromBody" type="this:attributeFromBodyType"/>
<element name="bean" type="this:beanType"/>
<element name="configurator" type="this:configuratorType"/>
<element name="description" type="this:descriptionType"/>
<element name="elementParent" type="this:elementParentType"/>
<element name="elementSkipPhase" type="this:elementSkipPhaseType"/>
</choice>
<attribute name="id" type="string">
<annotation>
<documentation xml:lang="en">The attribute id. (with tag as alias)
</documentation>
</annotation>
</attribute>
<attribute name="tag" type="string"/>
<attribute name="objectClass" type="string">
<annotation>
<documentation xml:lang="en">The class of the wrapped object.
</documentation>
</annotation>
</attribute>
<attribute name="elementClass" type="string">
<annotation>
<documentation xml:lang="en">An custom element class to config object.
</documentation>
</annotation>
</attribute>
<attribute name="schemaContentComplex" type="boolean"/>
<attribute name="autoAttributes" type="boolean"/>
<attribute name="schemaContentMixed" type="boolean"/>
<attribute name="schemaContentBase" type="string"/>
<attribute name="description" type="string"/>
</complexType>
<complexType name="attributeAliasType">
<choice minOccurs="0" maxOccurs="unbounded"/>
<attribute name="name" type="string" use="required">
<annotation>
<documentation xml:lang="en">The alias name to add to the attribute.
</documentation>
</annotation>
</attribute>
<anyAttribute/>
</complexType>
<complexType name="configuratorGlobalType">
<choice minOccurs="0" maxOccurs="unbounded">
<element name="description" type="this:descriptionType"/>
</choice>
<attribute name="id" type="string" use="required">
<annotation>
<documentation xml:lang="en">The global element configurator id.
</documentation>
</annotation>
</attribute>
<attribute name="bean.class" type="string" use="required">
<annotation>
<documentation xml:lang="en">The class of the element configurator.
</documentation>
</annotation>
</attribute>
<attribute name="configAction" type="string">
<annotation>
<documentation xml:lang="en">If set to true then run in config phase.
</documentation>
</annotation>
</attribute>
<anyAttribute/>
</complexType>
<complexType name="configuratorType">
<choice minOccurs="0" maxOccurs="unbounded">
<element name="description" type="this:descriptionType"/>
</choice>
<attribute name="id" type="string" use="required">
<annotation>
<documentation xml:lang="en">The element configurator id.
</documentation>
</annotation>
</attribute>
<attribute name="bean.class" type="string" use="required">
<annotation>
<documentation xml:lang="en">The class of the global element configurator.
</documentation>
</annotation>
</attribute>
<attribute name="configAction" type="string">
<annotation>
<documentation xml:lang="en">If set to true then run in config phase.
</documentation>
</annotation>
</attribute>
<anyAttribute/>
</complexType>
<complexType name="attributeFromBodyType">
<choice minOccurs="0" maxOccurs="unbounded">
<element name="description" type="this:descriptionType"/>
</choice>
<attribute name="bodyType" type="string">
<annotation>
<documentation xml:lang="en">See org.x4o.xml.element.Element.ElementType for options defaults to 'characters'.
</documentation>
</annotation>
</attribute>
<attribute name="id" type="string" use="required">
<annotation>
<documentation xml:lang="en">The id for this configurator.
</documentation>
</annotation>
</attribute>
<attribute name="name" type="string" use="required">
<annotation>
<documentation xml:lang="en">The attribute name to fill the value.
</documentation>
</annotation>
</attribute>
</complexType>
<complexType name="attributeHandlerType">
<choice minOccurs="0" maxOccurs="unbounded">
<element name="attributeHandlerNextAttribute" type="this:attributeHandlerNextAttributeType"/>
<element name="description" type="this:descriptionType"/>
</choice>
<attribute name="attributeName" type="string" use="required">
<annotation>
<documentation xml:lang="en">The xml attribute name.
</documentation>
</annotation>
</attribute>
<attribute name="id" type="string" use="required">
<annotation>
<documentation xml:lang="en">The atttribute handler id.
</documentation>
</annotation>
</attribute>
<attribute name="bean.class" type="string" use="required">
<annotation>
<documentation xml:lang="en">The class of the attribute handler.
</documentation>
</annotation>
</attribute>
<anyAttribute/>
</complexType>
<complexType name="attributeHandlerNextAttributeType">
<choice minOccurs="0" maxOccurs="unbounded"/>
<attribute name="attributeName" type="string" use="required">
<annotation>
<documentation xml:lang="en">The attribute name to run after this attribute.
</documentation>
</annotation>
</attribute>
<anyAttribute/>
</complexType>
<complexType name="attributeType">
<choice minOccurs="0" maxOccurs="unbounded">
<element ref="conv:beanConverter"/>
@ -249,46 +40,184 @@
</choice>
<attribute name="id" type="string">
<annotation>
<documentation xml:lang="en">The attribute id. (with name as alias)
</documentation>
<documentation xml:lang="en">The attribute id. (with name as alias)</documentation>
</annotation>
</attribute>
<attribute name="name" type="string"/>
<attribute name="required" type="boolean"/>
<attribute name="defaultValue" type="string"/>
<attribute name="objectConverter" type="string"/>
<attribute name="runResolveEL" type="boolean"/>
<attribute name="runConverters" type="boolean"/>
<attribute name="runBeanValue" type="boolean"/>
<attribute name="writeOrder" type="integer"/>
<attribute name="runConverters" type="boolean"/>
<attribute name="runResolveEL" type="boolean"/>
<attribute name="description" type="string"/>
</complexType>
<complexType name="namespaceAttributeType">
<choice minOccurs="0" maxOccurs="unbounded">
<element name="description" type="this:descriptionType"/>
<element name="namespaceAttributeNext" type="this:namespaceAttributeNextType"/>
</choice>
<attribute name="attributeName" type="string" use="required">
<annotation>
<documentation xml:lang="en">The xml attribute name.</documentation>
</annotation>
</attribute>
<attribute name="id" type="string" use="required">
<annotation>
<documentation xml:lang="en">The namespace attribute id.</documentation>
</annotation>
</attribute>
<attribute name="bean.class" type="string" use="required">
<annotation>
<documentation xml:lang="en">The class of the namespace attribute.</documentation>
</annotation>
</attribute>
<anyAttribute/>
</complexType>
<complexType name="namespaceType">
<choice minOccurs="0" maxOccurs="unbounded">
<element name="description" type="this:descriptionType"/>
<element name="element" type="this:elementType"/>
<element name="namespaceAttribute" type="this:namespaceAttributeType"/>
</choice>
<attribute name="id" type="string" use="required">
<annotation>
<documentation xml:lang="en">The namespace id.</documentation>
</annotation>
</attribute>
<attribute name="name" type="string"/>
<attribute name="languageRoot" type="boolean"/>
<attribute name="schemaPrefix" type="string"/>
<attribute name="prefixMapping" type="string"/>
<attribute name="schemaUri" type="string"/>
<attribute name="schemaResource" type="string"/>
<attribute name="elementNamespaceInstanceProvider" type="string"/>
<attribute name="uri" type="string"/>
<attribute name="description" type="string"/>
</complexType>
<complexType name="descriptionType">
<simpleContent>
<extension base="string">
<anyAttribute/>
</extension>
</simpleContent>
</complexType>
<complexType name="bindingHandlerType">
<choice minOccurs="0" maxOccurs="unbounded">
<element name="description" type="this:descriptionType"/>
</choice>
<attribute name="id" type="string" use="required">
<annotation>
<documentation xml:lang="en">The binding handler id.
</documentation>
<documentation xml:lang="en">The binding handler id.</documentation>
</annotation>
</attribute>
<attribute name="bean.class" type="string" use="required">
<annotation>
<documentation xml:lang="en">The class of the binding handler.
</documentation>
<documentation xml:lang="en">The class of the binding handler.</documentation>
</annotation>
</attribute>
<anyAttribute/>
</complexType>
<complexType name="elementSkipPhaseType">
<choice minOccurs="0" maxOccurs="unbounded"/>
<attribute name="name" type="string" use="required">
<annotation>
<documentation xml:lang="en">The name of the phase to skip.</documentation>
</annotation>
</attribute>
<anyAttribute/>
</complexType>
<complexType name="elementType">
<choice minOccurs="0" maxOccurs="unbounded">
<element name="attribute" type="this:attributeType"/>
<element name="attributeFromBody" type="this:attributeFromBodyType"/>
<element name="bean" type="this:beanType"/>
<element name="configurator" type="this:configuratorType"/>
<element name="description" type="this:descriptionType"/>
<element name="elementParent" type="this:elementParentType"/>
<element name="elementSkipPhase" type="this:elementSkipPhaseType"/>
</choice>
<attribute name="id" type="string">
<annotation>
<documentation xml:lang="en">The attribute id. (with tag as alias)</documentation>
</annotation>
</attribute>
<attribute name="tag" type="string"/>
<attribute name="objectClass" type="string">
<annotation>
<documentation xml:lang="en">The class of the wrapped object.</documentation>
</annotation>
</attribute>
<attribute name="elementClass" type="string">
<annotation>
<documentation xml:lang="en">An custom element class to config object.</documentation>
</annotation>
</attribute>
<attribute name="autoAttributes" type="boolean"/>
<attribute name="schemaContentBase" type="string"/>
<attribute name="schemaContentComplex" type="boolean"/>
<attribute name="schemaContentMixed" type="boolean"/>
<attribute name="description" type="string"/>
</complexType>
<complexType name="attributeAliasType">
<choice minOccurs="0" maxOccurs="unbounded"/>
<attribute name="name" type="string" use="required">
<annotation>
<documentation xml:lang="en">The alias name to add to the attribute.</documentation>
</annotation>
</attribute>
<anyAttribute/>
</complexType>
<complexType name="configuratorGlobalType">
<choice minOccurs="0" maxOccurs="unbounded">
<element name="description" type="this:descriptionType"/>
</choice>
<attribute name="id" type="string" use="required">
<annotation>
<documentation xml:lang="en">The global element configurator id.</documentation>
</annotation>
</attribute>
<attribute name="bean.class" type="string" use="required">
<annotation>
<documentation xml:lang="en">The class of the element configurator.</documentation>
</annotation>
</attribute>
<attribute name="configAction" type="string">
<annotation>
<documentation xml:lang="en">If set to true then run in config phase.</documentation>
</annotation>
</attribute>
<anyAttribute/>
</complexType>
<complexType name="configuratorType">
<choice minOccurs="0" maxOccurs="unbounded">
<element name="description" type="this:descriptionType"/>
</choice>
<attribute name="id" type="string" use="required">
<annotation>
<documentation xml:lang="en">The element configurator id.</documentation>
</annotation>
</attribute>
<attribute name="bean.class" type="string" use="required">
<annotation>
<documentation xml:lang="en">The class of the global element configurator.</documentation>
</annotation>
</attribute>
<attribute name="configAction" type="string">
<annotation>
<documentation xml:lang="en">If set to true then run in config phase.</documentation>
</annotation>
</attribute>
<anyAttribute/>
</complexType>
<complexType name="beanType">
<choice minOccurs="0" maxOccurs="unbounded">
<element name="attributeHandlerNextAttribute" type="this:attributeHandlerNextAttributeType"/>
<element name="namespaceAttributeNext" type="this:namespaceAttributeNextType"/>
</choice>
<attribute name="bean.class" type="string">
<annotation>
<documentation xml:lang="en">The class name of the the class to load.
</documentation>
<documentation xml:lang="en">The class name of the the class to load.</documentation>
</annotation>
</attribute>
<anyAttribute/>
@ -299,32 +228,27 @@
</choice>
<attribute name="id" type="string" use="required">
<annotation>
<documentation xml:lang="en">The id for this binding handler.
</documentation>
<documentation xml:lang="en">The id for this binding handler.</documentation>
</annotation>
</attribute>
<attribute name="childClass" type="string" use="required">
<annotation>
<documentation xml:lang="en">The child class.
</documentation>
<documentation xml:lang="en">The child class.</documentation>
</annotation>
</attribute>
<attribute name="parentClass" type="string" use="required">
<annotation>
<documentation xml:lang="en">The parent class.
</documentation>
<documentation xml:lang="en">The parent class.</documentation>
</annotation>
</attribute>
<attribute name="getMethod" type="string" use="required">
<annotation>
<documentation xml:lang="en">The method name of the method used to get the childeren of the parent.
</documentation>
<documentation xml:lang="en">The method name of the method used to get the childeren of the parent.</documentation>
</annotation>
</attribute>
<attribute name="addMethod" type="string" use="required">
<annotation>
<documentation xml:lang="en">The method name of the method used to add the child to the parent.
</documentation>
<documentation xml:lang="en">The method name of the method used to add the child to the parent.</documentation>
</annotation>
</attribute>
</complexType>
@ -333,136 +257,143 @@
<element name="attribute" type="this:attributeType"/>
<element name="attributeFromBody" type="this:attributeFromBodyType"/>
<element name="bean" type="this:beanType"/>
<element name="bindingHandler" type="this:bindingHandlerType"/>
<element name="classBindingHandler" type="this:classBindingHandlerType"/>
<element name="configurator" type="this:configuratorType"/>
<element name="description" type="this:descriptionType"/>
<element name="elementParent" type="this:elementParentType"/>
</choice>
<attribute name="id" type="string" use="required">
<annotation>
<documentation xml:lang="en">The interface id.
</documentation>
<documentation xml:lang="en">The interface id.</documentation>
</annotation>
</attribute>
<attribute name="interfaceClass" type="string" use="required">
<annotation>
<documentation xml:lang="en">The interface class.
</documentation>
<documentation xml:lang="en">The interface class.</documentation>
</annotation>
</attribute>
<attribute name="description" type="string"/>
</complexType>
<complexType name="attributeFromBodyType">
<choice minOccurs="0" maxOccurs="unbounded">
<element name="description" type="this:descriptionType"/>
</choice>
<attribute name="bodyType" type="string">
<annotation>
<documentation xml:lang="en">See org.x4o.xml.element.Element.ElementType for options defaults to &apos;characters&apos;.</documentation>
</annotation>
</attribute>
<attribute name="id" type="string" use="required">
<annotation>
<documentation xml:lang="en">The id for this configurator.</documentation>
</annotation>
</attribute>
<attribute name="name" type="string" use="required">
<annotation>
<documentation xml:lang="en">The attribute name to fill the value.</documentation>
</annotation>
</attribute>
</complexType>
<complexType name="elementParentType">
<choice minOccurs="0" maxOccurs="unbounded"/>
<attribute name="tag" type="string">
<annotation>
<documentation xml:lang="en">The parent tag to have object for.
</documentation>
<documentation xml:lang="en">The parent tag to have object for.</documentation>
</annotation>
</attribute>
<attribute name="uri" type="string">
<annotation>
<documentation xml:lang="en">The element namespace uri if non local parent.
</documentation>
<documentation xml:lang="en">The element namespace uri if non local parent.</documentation>
</annotation>
</attribute>
<anyAttribute/>
</complexType>
<complexType name="namespaceAttributeNextType">
<choice minOccurs="0" maxOccurs="unbounded"/>
<attribute name="attributeName" type="string" use="required">
<annotation>
<documentation xml:lang="en">The attribute name to run after this attribute.</documentation>
</annotation>
</attribute>
<anyAttribute/>
</complexType>
<element name="attribute" type="this:attributeType">
<annotation>
<documentation xml:lang="en">XML Element Attribute tag.</documentation>
</annotation>
</element>
<element name="namespaceAttribute" type="this:namespaceAttributeType">
<annotation>
<documentation xml:lang="en">Define an className in bean.class for an ElementNamespaceAttribute.</documentation>
</annotation>
</element>
<element name="namespace" type="this:namespaceType">
<annotation>
<documentation xml:lang="en">Defines an namespace for the language.
</documentation>
<documentation xml:lang="en">Defines an namespace for the language.</documentation>
</annotation>
</element>
<element name="description" type="this:descriptionType">
<annotation>
<documentation xml:lang="en">An ELD elementDescription field which lets you type text like this one in xml characters instead of an attribute.
</documentation>
</annotation>
</element>
<element name="elementSkipPhase" type="this:elementSkipPhaseType">
<annotation>
<documentation xml:lang="en">Adds an phase to skip to the parent element.
</documentation>
</annotation>
</element>
<element name="element" type="this:elementType">
<annotation>
<documentation xml:lang="en">The xml element.
</documentation>
</annotation>
</element>
<element name="attributeAlias" type="this:attributeAliasType">
<annotation>
<documentation xml:lang="en">Defines an alias for an attribute name.
</documentation>
</annotation>
</element>
<element name="configuratorGlobal" type="this:configuratorGlobalType">
<annotation>
<documentation xml:lang="en">Define an className in bean.class for an ElementConfiguratorGlobal.
</documentation>
</annotation>
</element>
<element name="configurator" type="this:configuratorType">
<annotation>
<documentation xml:lang="en">Define an className in bean.class for an ElementConfigurator.
</documentation>
</annotation>
</element>
<element name="attributeFromBody" type="this:attributeFromBodyType">
<annotation>
<documentation xml:lang="en">Defines an alias for an attribute name.
</documentation>
</annotation>
</element>
<element name="attributeHandler" type="this:attributeHandlerType">
<annotation>
<documentation xml:lang="en">Define an className in bean.class for an ElementAttributeHandler.
</documentation>
</annotation>
</element>
<element name="attributeHandlerNextAttribute" type="this:attributeHandlerNextAttributeType">
<annotation>
<documentation xml:lang="en">Defines the parameter order.
</documentation>
</annotation>
</element>
<element name="attribute" type="this:attributeType">
<annotation>
<documentation xml:lang="en">XML Element Attribute tag.
</documentation>
<documentation xml:lang="en">An ELD elementDescription field which lets you type text like this one in xml characters instead of an attribute.</documentation>
</annotation>
</element>
<element name="bindingHandler" type="this:bindingHandlerType">
<annotation>
<documentation xml:lang="en">Define an className in bean.class for an ElementBindingHandler interface.
</documentation>
<documentation xml:lang="en">Define an className in bean.class for an ElementBindingHandler interface.</documentation>
</annotation>
</element>
<element name="elementSkipPhase" type="this:elementSkipPhaseType">
<annotation>
<documentation xml:lang="en">Adds an phase to skip to the parent element.</documentation>
</annotation>
</element>
<element name="element" type="this:elementType">
<annotation>
<documentation xml:lang="en">The xml element.</documentation>
</annotation>
</element>
<element name="attributeAlias" type="this:attributeAliasType">
<annotation>
<documentation xml:lang="en">Defines an alias for an attribute name.</documentation>
</annotation>
</element>
<element name="configuratorGlobal" type="this:configuratorGlobalType">
<annotation>
<documentation xml:lang="en">Define an className in bean.class for an ElementConfiguratorGlobal.</documentation>
</annotation>
</element>
<element name="configurator" type="this:configuratorType">
<annotation>
<documentation xml:lang="en">Define an className in bean.class for an ElementConfigurator.</documentation>
</annotation>
</element>
<element name="bean" type="this:beanType">
<annotation>
<documentation xml:lang="en">Loads bean into the Element
</documentation>
<documentation xml:lang="en">Loads bean into the Element</documentation>
</annotation>
</element>
<element name="classBindingHandler" type="this:classBindingHandlerType">
<annotation>
<documentation xml:lang="en">Lets you dynamicly bind to object togecher.
</documentation>
<documentation xml:lang="en">Lets you dynamicly bind to object togecher.</documentation>
</annotation>
</element>
<element name="elementInterface" type="this:elementInterfaceType">
<annotation>
<documentation xml:lang="en">Config element objects by java interface.
</documentation>
<documentation xml:lang="en">Config element objects by java interface.</documentation>
</annotation>
</element>
<element name="attributeFromBody" type="this:attributeFromBodyType">
<annotation>
<documentation xml:lang="en">Defines an alias for an attribute name.</documentation>
</annotation>
</element>
<element name="elementParent" type="this:elementParentType">
<annotation>
<documentation xml:lang="en">Adds an parent element tag for xsd
</documentation>
<documentation xml:lang="en">Adds an parent element tag for xsd</documentation>
</annotation>
</element>
<element name="namespaceAttributeNext" type="this:namespaceAttributeNextType">
<annotation>
<documentation xml:lang="en">Defines the parameter order.</documentation>
</annotation>
</element>
</schema>

View file

@ -129,18 +129,18 @@
<elementParent tag="module" uri="http://eld.x4o.org/xml/ns/eld-root"/>
</element>
<element id="attributeHandler" elementClass="org.x4o.xml.eld.lang.BeanElement">
<description>Define an className in bean.class for an ElementAttributeHandler.</description>
<element id="namespaceAttribute" elementClass="org.x4o.xml.eld.lang.BeanElement">
<description>Define an className in bean.class for an ElementNamespaceAttribute.</description>
<attribute id="id" required="true">
<description>The atttribute handler id.</description>
<description>The namespace attribute id.</description>
</attribute>
<attribute id="bean.class" required="true">
<description>The class of the attribute handler.</description>
<description>The class of the namespace attribute.</description>
</attribute>
<attribute id="attributeName" required="true">
<description>The xml attribute name.</description>
</attribute>
<elementParent tag="module" uri="http://eld.x4o.org/xml/ns/eld-root"/>
<elementParent tag="namespace"/>
</element>
<element id="configuratorGlobal" elementClass="org.x4o.xml.eld.lang.BeanElement">
@ -176,8 +176,8 @@
<description>An ELD elementDescription field which lets you type text like this one in xml characters instead of an attribute.</description>
<elementParent tag="module" uri="http://eld.x4o.org/xml/ns/eld-root"/>
<elementParent tag="namespace"/>
<elementParent tag="namespaceAttribute"/>
<elementParent tag="bindingHandler"/>
<elementParent tag="attributeHandler"/>
<elementParent tag="configurator"/>
<elementParent tag="configuratorGlobal"/>
<elementParent tag="elementInterface"/>
@ -210,12 +210,12 @@
<elementParent tag="element"/>
</element>
<element id="attributeHandlerNextAttribute" elementClass="org.x4o.xml.eld.lang.NextAttributeElement">
<element id="namespaceAttributeNext" elementClass="org.x4o.xml.eld.lang.NextAttributeElement">
<description>Defines the parameter order.</description>
<attribute id="attributeName" required="true">
<description>The attribute name to run after this attribute.</description>
</attribute>
<elementParent tag="attributeHandler"/>
<elementParent tag="namespaceAttribute"/>
<elementParent tag="bean"/>
</element>

View file

@ -1,31 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2004-2013, Willem Cazander
All rights reserved.
<!-- ==================================================================== -->
Redistribution and use in source and binary forms, with or without modification, are permitted provided
that the following conditions are met:
<!-- ===== Automatic generated schema for language: eld ===== -->
* Redistributions of source code must retain the above copyright notice, this list of conditions and the
following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
the following disclaimer in the documentation and/or other materials provided with the distribution.
<!-- ==================================================================== -->
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-->
<!-- ==================================================================== -->
<!-- ===== Automatic generated schema for language: eld ===== -->
<!-- ==================================================================== -->
<!--
ID: eld-module
ProviderName: Element Language Definition
@ -33,8 +13,8 @@
Namespaces: 3
Uri: http://eld.x4o.org/xml/ns/eld-root
Uri schema: http://eld.x4o.org/xml/ns/eld-root-1.0.xsd
Created on: Sun Apr 28 11:56:32 CEST 2013
-->
Created on: Sat Aug 24 21:57:18 CEST 2013
-->
<schema xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:conv="http://eld.x4o.org/xml/ns/eld-conv"
xmlns:lang="http://eld.x4o.org/xml/ns/eld-lang"
@ -44,7 +24,6 @@
<element name="module">
<complexType>
<choice minOccurs="0" maxOccurs="unbounded">
<element ref="lang:attributeHandler"/>
<element ref="lang:bean"/>
<element ref="lang:bindingHandler"/>
<element ref="lang:classBindingHandler"/>
@ -55,20 +34,17 @@
</choice>
<attribute name="id" type="string" use="required">
<annotation>
<documentation xml:lang="en">The module id.
</documentation>
<documentation xml:lang="en">The module id.</documentation>
</annotation>
</attribute>
<attribute name="providerName" type="string">
<annotation>
<documentation xml:lang="en">The provider name in normal en:lang.
</documentation>
<documentation xml:lang="en">The provider name in normal en:lang.</documentation>
</annotation>
</attribute>
<attribute name="providerHost" type="string" use="required">
<annotation>
<documentation xml:lang="en">The provider host like langx.someorg.domain for uri/etc defaults.
</documentation>
<documentation xml:lang="en">The provider host like langx.someorg.domain for uri/etc defaults.</documentation>
</annotation>
</attribute>
<attribute name="languageModuleLoader" type="string"/>

View file

@ -22,7 +22,7 @@
*/
package org.x4o.xml.test.element;
import org.x4o.xml.element.AbstractElementAttributeHandler;
import org.x4o.xml.element.AbstractElementNamespaceAttribute;
import org.x4o.xml.element.Element;
import org.x4o.xml.element.ElementConfiguratorException;
@ -32,7 +32,7 @@ import org.x4o.xml.element.ElementConfiguratorException;
* @author Willem Cazander
* @version 1.0 Aug 27, 2012
*/
public class TestElementAttributeHandler extends AbstractElementAttributeHandler {
public class TestElementNamespaceAttribute extends AbstractElementNamespaceAttribute {
public void doConfigElement(Element element) throws ElementConfiguratorException {

View file

@ -65,25 +65,10 @@
</eld:attribute>
</eld:elementInterface>
<eld:elementInterface id="JComponent" interfaceClass="javax.swing.JComponent">
<eld:description>Configs the JComponent based objects.</eld:description>
<eld:classBindingHandler id="JComponent-JComponent" parentClass="javax.swing.JComponent" childClass="javax.swing.JComponent" addMethod="add" getMethod="getComponents">
<eld:description>Binds the JComponent to the JComponent.</eld:description>
</eld:classBindingHandler>
</eld:elementInterface>
<eld:configuratorGlobal bean.class="org.x4o.xml.test.element.TestElementConfigurator" id="testConfigGlobal">
<eld:description>Test the global element configurator.</eld:description>
</eld:configuratorGlobal>
<eld:attributeHandler attributeName="tt.attr1" bean.class="org.x4o.xml.test.element.TestElementAttributeHandler" id="attrTest1">
<eld:description>Test the global element attribute1 handler.</eld:description>
</eld:attributeHandler>
<eld:attributeHandler attributeName="tt.attr2" bean.class="org.x4o.xml.test.element.TestElementAttributeHandler" id="attrTest2">
<eld:description>Test the global element attribute2 handler.</eld:description>
<eld:attributeHandlerNextAttribute attributeName="tt.attr1"/>
</eld:attributeHandler>
<eld:namespace
uri="http://test.x4o.org/xml/ns/test-root"
schemaUri="http://test.x4o.org/xml/ns/test-root-1.0.xsd"
@ -109,6 +94,14 @@
name="Test Language Namespace"
id="test-lang"
>
<eld:namespaceAttribute attributeName="attr1" bean.class="org.x4o.xml.test.element.TestElementNamespaceAttribute" id="attrTest1">
<eld:description>Test the global element attribute1 handler.</eld:description>
</eld:namespaceAttribute>
<eld:namespaceAttribute attributeName="attr2" bean.class="org.x4o.xml.test.element.TestElementNamespaceAttribute" id="attrTest2">
<eld:description>Test the global element attribute2 handler.</eld:description>
<eld:namespaceAttributeNext attributeName="attr1"/>
</eld:namespaceAttribute>
<eld:element tag="testNoNSRoot" objectClass="org.x4o.xml.test.models.TestObjectRoot"/>
<eld:element tag="testBean" objectClass="org.x4o.xml.test.models.TestBean">

View file

@ -72,20 +72,6 @@
</eld:classBindingHandler>
</eld:elementInterface>
<!-- TODO: fix writer, run EldParserTest
<eld:configuratorGlobal bean.class="org.x4o.xml.test.element.TestElementConfigurator" id="testConfigGlobal">
<eld:description>Test the global element configurator.</eld:description>
</eld:configuratorGlobal>
<eld:attributeHandler attributeName="tt.attr1" bean.class="org.x4o.xml.test.element.TestElementAttributeHandler" id="attrTest1">
<eld:description>Test the global element attribute1 handler.</eld:description>
</eld:attributeHandler>
<eld:attributeHandler attributeName="tt.attr2" bean.class="org.x4o.xml.test.element.TestElementAttributeHandler" id="attrTest2">
<eld:description>Test the global element attribute2 handler.</eld:description>
<eld:attributeHandlerNextAttribute attributeName="tt.attr1"/>
</eld:attributeHandler>
-->
<eld:namespace
uri="http://test.x4o.org/xml/ns/test-root"
schemaUri="http://test.x4o.org/xml/ns/test-root-1.0.xsd"
@ -111,6 +97,15 @@
name="Test Language Namespace"
id="test-lang"
>
<!-- TODO: fix x4o writer, run EldParserTest
<eld:namespaceAttribute attributeName="attr1" bean.class="org.x4o.xml.test.element.TestElementNamespaceAttribute" id="attrTest1">
<eld:description>Test the global element attribute1 handler.</eld:description>
</eld:namespaceAttribute>
<eld:namespaceAttribute attributeName="attr2" bean.class="org.x4o.xml.test.element.TestElementNamespaceAttribute" id="attrTest2">
<eld:description>Test the global element attribute2 handler.</eld:description>
<eld:attributeHandlerNextAttribute attributeName="attr1"/>
</eld:namespaceAttribute>
-->
<eld:element tag="testNoNSRoot" objectClass="org.x4o.xml.test.models.TestObjectRoot"/>
<eld:element tag="testBean" objectClass="org.x4o.xml.test.models.TestBean">

View file

@ -44,7 +44,7 @@
<defaultElementNamespaceInstanceProvider></defaultElementNamespaceInstanceProvider>
<defaultElementAttributeValueParser></defaultElementAttributeValueParser>
<defaultElementObjectPropertyValue></defaultElementObjectPropertyValue>
<defaultElementAttributeHandlerComparator></defaultElementAttributeHandlerComparator>
<defaultElementNamespaceAttributeComparator></defaultElementNamespaceAttributeComparator>
<properties>
<property key="" value=""/>

View file

@ -35,7 +35,7 @@ import org.x4o.xml.eld.doc.api.DefaultPageWriterTree;
import org.x4o.xml.eld.doc.api.dom.ApiDoc;
import org.x4o.xml.eld.doc.api.dom.ApiDocConcept;
import org.x4o.xml.eld.doc.api.dom.ApiDocNode;
import org.x4o.xml.element.ElementAttributeHandler;
import org.x4o.xml.element.ElementNamespaceAttribute;
import org.x4o.xml.element.ElementBindingHandler;
import org.x4o.xml.element.ElementClass;
import org.x4o.xml.element.ElementClassAttribute;
@ -136,7 +136,7 @@ public class EldDocWriter {
ApiDocConcept adcEc = doc.addConcept(new ApiDocConcept(adcNs,C_ELEMENT,ElementClass.class));
// mm maybe redo something here
adcMod.addChildConcepts(new ApiDocConcept(adcMod,CC_ATTRIBUTE_H,ElementAttributeHandler.class));
adcMod.addChildConcepts(new ApiDocConcept(adcMod,CC_ATTRIBUTE_H,ElementNamespaceAttribute.class));
adcMod.addChildConcepts(new ApiDocConcept(adcMod,CC_CONFIGURATOR_G,ElementConfiguratorGlobal.class));
adcMod.addChildConcepts(new ApiDocConcept(adcMod,CC_BINDING,ElementBindingHandler.class));
adcIface.addChildConcepts(new ApiDocConcept(adcMod,CC_ATTRIBUTE,ElementClassAttribute.class));
@ -153,12 +153,12 @@ public class EldDocWriter {
doc.setRootNode(rootNode);
for (X4OLanguageModule mod:context.getLanguage().getLanguageModules()) { ApiDocNode modNode = rootNode.addNode(createNodeLanguageModule(mod));
for (ElementBindingHandler bind:mod.getElementBindingHandlers()) { modNode.addNode(createNodeElementBindingHandler(bind)); }
for (ElementAttributeHandler attr:mod.getElementAttributeHandlers()) { modNode.addNode(createNodeElementAttributeHandler(attr)); }
for (ElementConfiguratorGlobal conf:mod.getElementConfiguratorGlobals()) { modNode.addNode(createNodeElementConfiguratorGlobal(conf)); }
for (ElementInterface iface:mod.getElementInterfaces()) { ApiDocNode ifaceNode = modNode.addNode(createNodeElementInterface(iface));
for (ElementClassAttribute eca:iface.getElementClassAttributes()) { ifaceNode.addNode(createNodeElementClassAttribute(eca)); }
for (ElementConfigurator conf:iface.getElementConfigurators()) { ifaceNode.addNode(createNodeElementConfigurator(conf)); } }
for (ElementNamespace ns:mod.getElementNamespaces()) { ApiDocNode nsNode = modNode.addNode(createNodeElementNamespace(ns));
for (ElementNamespaceAttribute attr:ns.getElementNamespaceAttributes()) { nsNode.addNode(createNodeElementNamespaceAttribute(attr)); }
for (ElementClass ec:ns.getElementClasses()) { ApiDocNode ecNode = nsNode.addNode(createNodeElementClass(ec));
for (ElementClassAttribute eca:ec.getElementClassAttributes()) { ecNode.addNode(createNodeElementClassAttribute(eca)); }
for (ElementConfigurator conf:ec.getElementConfigurators()) { ecNode.addNode(createNodeElementConfigurator(conf)); } } }
@ -169,7 +169,7 @@ public class EldDocWriter {
private ApiDocNode createNodeElementBindingHandler(ElementBindingHandler bind) {
return new ApiDocNode(bind,bind.getId(),bind.getId(),bind.getDescription());
}
private ApiDocNode createNodeElementAttributeHandler(ElementAttributeHandler attr) {
private ApiDocNode createNodeElementNamespaceAttribute(ElementNamespaceAttribute attr) {
return new ApiDocNode(attr,attr.getId(),attr.getId(),attr.getDescription());
}
private ApiDocNode createNodeElementConfiguratorGlobal(ElementConfiguratorGlobal conf) {

View file

@ -76,13 +76,13 @@ public class EldDocWriterLanguage extends AbstractApiDocWriter {
int elements = 0;
int namespaces = 0;
for (X4OLanguageModule mod:context.getLanguage().getLanguageModules()) {
attrHandlers += mod.getElementAttributeHandlers().size();
bindHandlers += mod.getElementBindingHandlers().size();
interFaces += mod.getElementInterfaces().size();
eleConfigs += mod.getElementConfiguratorGlobals().size();
for (ElementNamespace ns:mod.getElementNamespaces()) {
namespaces++;
elements += ns.getElementClasses().size();
attrHandlers += ns.getElementNamespaceAttributes().size();
}
}
writer.docTableStart("Language Summary", "Language Stats Summary.",ApiDocContentCss.overviewSummary);
@ -90,10 +90,10 @@ public class EldDocWriterLanguage extends AbstractApiDocWriter {
writer.docTableRow("LanguageName:", ""+context.getLanguage().getLanguageName(), null);
writer.docTableRow("LanguageVersion:",""+context.getLanguage().getLanguageVersion(),null);
writer.docTableRow("Modules:",""+context.getLanguage().getLanguageModules().size(),null);
writer.docTableRow("Namespaces:",""+namespaces,null);
writer.docTableRow("Elements:",""+elements,null);
writer.docTableRow("ElementNamespaces:",""+namespaces,null);
writer.docTableRow("ElementNamespaceAttribute:",""+attrHandlers,null);
writer.docTableRow("ElementInterfaces:",""+interFaces,null);
writer.docTableRow("ElementAttributeHandlers:",""+attrHandlers,null);
writer.docTableRow("ElementBindingHandlers:",""+bindHandlers,null);
writer.docTableRow("ElementConfigurators:",""+eleConfigs,null);
writer.docTableEnd();

View file

@ -30,7 +30,7 @@ import org.x4o.xml.eld.doc.api.dom.ApiDocNode;
import org.x4o.xml.eld.doc.api.dom.ApiDocNodeBody;
import org.x4o.xml.eld.doc.api.dom.ApiDocNodeData;
import org.x4o.xml.eld.doc.api.dom.ApiDocWriteEvent;
import org.x4o.xml.element.ElementAttributeHandler;
import org.x4o.xml.element.ElementNamespaceAttribute;
import org.x4o.xml.element.ElementBindingHandler;
import org.x4o.xml.element.ElementConfigurator;
import org.x4o.xml.element.ElementInterface;
@ -50,7 +50,7 @@ public class EldDocWriterLanguageModule extends AbstractApiDocWriter {
public void configNavBar(ApiDoc doc,ApiDocNode node,ApiDocNodeData data) {
clearHrefContentGroup(doc,node,"summary","interface",ElementInterface.class);
clearHrefContentGroup(doc,node,"summary","binding",ElementBindingHandler.class);
clearHrefContentGroup(doc,node,"summary","attribute",ElementAttributeHandler.class);
clearHrefContentGroup(doc,node,"summary","attribute",ElementNamespaceAttribute.class);
clearHrefContentGroup(doc,node,"summary","configurator",ElementConfigurator.class);
clearHrefContentGroup(doc,node,"summary","namespace",ElementNamespace.class);
}
@ -67,7 +67,7 @@ public class EldDocWriterLanguageModule extends AbstractApiDocWriter {
@ApiDocNodeWriterMethod(nodeBody=ApiDocNodeBody.SUMMARY,targetClasses={X4OLanguageModule.class},nodeBodyOrders={3},contentGroup="attribute",contentGroupType="summary")
public void writeAttributeSummary(ApiDocWriteEvent<ApiDocNode> event) throws SAXException {
printApiTable(event,"Attribute Summary",ElementAttributeHandler.class);
printApiTable(event,"Attribute Summary",ElementNamespaceAttribute.class);
}
@ApiDocNodeWriterMethod(nodeBody=ApiDocNodeBody.SUMMARY,targetClasses={X4OLanguageModule.class},nodeBodyOrders={4},contentGroup="configurator",contentGroupType="summary")

View file

@ -26,7 +26,7 @@ import java.util.logging.Logger;
import javax.el.ValueExpression;
import org.x4o.xml.element.AbstractElementAttributeHandler;
import org.x4o.xml.element.AbstractElementNamespaceAttribute;
import org.x4o.xml.element.Element;
import org.x4o.xml.element.ElementConfiguratorException;
@ -37,7 +37,7 @@ import org.x4o.xml.element.ElementConfiguratorException;
* @author Willem Cazander
* @version 1.0 Aug 23, 2006
*/
public class ELIDAttributeHandler extends AbstractElementAttributeHandler {
public class ELIDAttributeHandler extends AbstractElementNamespaceAttribute {
/**
* @see org.x4o.xml.element.ElementConfigurator#doConfigElement(org.x4o.xml.element.Element)