Oxygen doesn't report me clearly errors in RNG file
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 44
- Joined: Fri Aug 05, 2005 2:18 pm
Oxygen doesn't report me clearly errors in RNG file
Post by DavidPérez »
Oxygen doesn't report me clearly errors in the following RNG file:
<grammar
xmlns="http://relaxng.org/ns/structure/1.0"
xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0"
datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
<start>
<ref name="proceso"/>
</start>
<define name="proceso">
<a:documentation>Definicion de proceso RIMA con sus parametros. Con esta info se puede renderizar 1 formulario.</a:documentation>
<element name="proceso">
<a:documentation>Nombre del proceso. Se usa para generar el titulo.</a:documentation>
<attribute name="denominacion"/>
<optional>
<a:documentation>Modo de mostrar resultado de ejecucion del proceso.</a:documentation>
<attribute name="modo">
<choice>
<a:documentation>Mostrar salida proceso en misma pagina. Valor predefinido.</a:documentation>
<value>normal</value>
<a:documentation>Mostrar salida proceso en otra pagina</a:documentation>
<value>nue-pag</value>
<a:documentation>
Validar antes en servidor.
Util en estos casos:
- Cuando pueden haber errores no facilmente validables en el cliente.
- Tambien sirve para evitar no mostrar la salida del proceso (en caso de q no sea interesante) y redireccionar a otra URL.
La existencia de 1 parametro de tipo repetidor2fases, fuerza el valor a 1
</a:documentation>
<value>validar-antes</value>
</choice>
</attribute>
</optional>
<optional>
<a:documentation>
Definicion de plantilla? En tal caso se pueden definir parametros omitibles, q se deberan rellenar en 1 2ª fase.
Valor predefinido: 0
</a:documentation>
<attribute name="def-plant">
<ref name="booleano"/>
</attribute>
</optional>
<optional>
<a:documentation>Script adicional necesario, sin extension ni ruta. Usado para poner codigo de por ej. botones de accion</a:documentation>
<attribute name="script-adicional"/>
</optional>
<ref name="acciones"/>
<optional>
<a:documentation>Datos iniciales en formato JSON a cargar en controles. Debe corresponder a 1 objeto entre llaves</a:documentation>
<element name="valor">
<data type="string">
<!--param name="pattern">\{.*\}</param-->
</data>
</element>
</optional>
<optional>
<a:documentation>Info a enviar extra al servidor aparte de la introducida por el usuario. En formato JSON.</a:documentation>
<element name="info-extra">
<data type="string">
<!--param name="pattern">\{.*\}</param-->
</data>
</element>
</optional>
</element>
<element name="parametros">
<ref name="atr-contenedor"/>
</element>
</define>
<define name="param-grp">
<a:documentation>Un parametro o 1 grupo</a:documentation>
<choice>
<element name="grupo">
<optional>
<attribute name="denominacion"/>
</optional>
<ref name="posicionado-param"/>
<ref name="atr-contenedor"/>
<optional>
<a:documentation>Descripcion ampliada usada para 'tooltip'</a:documentation>
<element name="descripcion"><text/></element>
</optional>
<zeroOrMore>
<a:documentation>Podemos tener grupos vacios q sirven para generar huecos en el posicionado</a:documentation>
<ref name="param-grp"/>
</zeroOrMore>
</element>
<a:documentation>Explicacion en HTML.</a:documentation>
<element name="explicacion">
<ref name="cualquier-cosa"/>
</element>
<ref name="param"/>
</choice>
</define>
<define name="param">
<element name="parametro">
<optional>
<a:documentation>Es omitible el parametro?. Solo se hace caso cuando proceso/@def-plant=1</a:documentation>
<attribute name="omitible">
<ref name="booleano"/>
</attribute>
</optional>
<ref name="posicionado-param"/>
<attribute name="id">
<a:documentation>Debe ser identificador valido de HTML</a:documentation>
<ref name='tipo-id'/>
</attribute>
<a:documentation>Usado para fabricar etiqueta del control asociado</a:documentation>
<attribute name="denominacion"/>
<optional>
<a:documentation>Valor predefinido para fabricar etiqueta de parametro omitido.
Interesante cuando denominacion tiene 1 valor parco como por ej. "", pues se sobreentiende etiqueta de control vecino.
</a:documentation>
<attribute name="denominacion-omitido"/>
</optional>
<choice>
<a:documentation>
@tipo determina el tipo de parametro del q se trata, y posible info especifica
al tipo del parametro.
</a:documentation>
<group>
<a:documentation>
Fecha sin hora.
Almacenado como texto en formato ISO como '2006-12-30'.
</a:documentation>
<attribute name="tipo">
<value>fecha</value>
</attribute>
<ref name="requerido"/>
</group>
<group>
<a:documentation>
Renderizado como <input type="checkbox"/>
Almacenado como true|false. Tipo nativo JSON/XML-RPC.
</a:documentation>
<attribute name="tipo">
<value>booleano</value>
</attribute>
<attribute name="valor-defecto">
<ref name="booleano"/>
</attribute>
</group>
<group>
<a:documentation>
Para introducir visualmente colores.
Almacenado como {r:255,g:255,b:255} en el caso del blanco.
</a:documentation>
<attribute name="tipo">
<value>color</value>
</attribute>
<ref name="requerido"/>
</group>
<group>
<a:documentation>
Interesante cuando los datos a editar varian en funcion de otras selecciones.
Se puede editar in situ o a través de ventana emergente q aparece tras picar 1 boton.
Almacenado como struct JSON/XML-RPC:
{ hijo1: valor1, hijo2: valor2, ....}
</a:documentation>
<attribute name="tipo">
<value>dinamico</value>
</attribute>
<optional>
<a:documentation>
2 modos de trabajo:
- emergente, se edita en ventana emergente separada
- en situ, no se edita aparte
Valor predeterminado es 1.
</a:documentation>
<attribute name="emerg">
<ref name="booleano"/>
</attribute>
</optional>
<ref name="requerido"/>
<optional>
<a:documentation>
Formulas para dinamicos emergentes.
Trozo codigo javascript q obtiene descripcion a partir de datos JSON (q son referenciados como 'd' en el codigo).
Dicho codigo debe terminar en 1 return q devuelva 1 valor textual.
Se interpreta devolver null o '' como borrar datos existentes.
Si se omite formula para 1 parametro dinamico, se usa descripcion del tipo:
* nombre parametro1: valor1
* nombre parametro2: valor2
</a:documentation>
<element name="formula-descripcion">
<attribute name="id">
<ref name="tipo-id"/>
</attribute>
<text/>
</element>
</optional>
<element name="seleccion">
<a:documentation>
Define la URI q define formulario emergente edicion parametros, q puede tener partes fijas y dependencias del valor de otros parametros
Dicha URI no debe contener extension, se añade .emerg o .din según convenga.
Parametros q estén dentro de ?d={} se literalizan automaticamente.
</a:documentation>
<oneOrMore>
<ref name="arg"/>
</oneOrMore>
</element>
</group>
<group>
<a:documentation>Como 1 repetidor, pero edicion no es en situ sino en dialogo aparte</a:documentation>
<attribute name="tipo">
<value>repetidor2fases</value>
</attribute>
<a:documentation>
URI del proceso con el q editar/insertar/borrar datos. Puede ser relativa (caso habitual) o absoluta.
Debe ser 1 proceso derivado de ProcesoEdicionTabla o debe dar funcionalidad equivalente.
Antes de editar subelemento, se guarda el conjunto del formulario.
Ideal para editar tablas con relaciones padre/hijo.
No tiene extension
</a:documentation>
<attribute name="proceso"/>
<a:documentation>Determina los elementos (filas) q contiene</a:documentation>
<element name="seleccion">
<attribute name="recurso"/>
<zeroOrMore>
<a:documentation>Estos parametros definen como obtener datos</a:documentation>
<element name="param">
<choice>
<group>
<a:documentation>De donde sacar el parametro</a:documentation>
<attribute name="ref"/>
<a:documentation>De donde sacar el parametro</a:documentation>
<attribute name="destino"/>
</group>
<group>
<attribute name="val"/>
</group>
</choice>
</element>
</zeroOrMore>
</element>
<a:documentation>Determina los atributos a mostrar de cada elemento (columnas)</a:documentation>
<element name="hijos">
<oneOrMore>
<element name="parametro">
<attribute name="id">
<ref name='tipo-id'/>
</attribute>
<attribute name="denominacion"/>
<optional>
<a:documentation>El atributo en cuestion es clave?. Valor predeterminado es '0'</a:documentation>
<attribute name="clave">
<ref name="booleano"/>
</attribute>
</optional>
</element>
</oneOrMore>
</element>
</group>
<group>
<a:documentation>
Equivalente al repeater de XForms, permite editar listas de valores arbitrarias.
Almacenado como array de objetos JSON:
[ { hijo1: valor1.1, hijo2: valor1.2, ...}, { hijo1: valor2.1, hijo2: valor2.2, ...}, .... ]
</a:documentation>
<attribute name="tipo">
<value>repetidor</value>
</attribute>
<a:documentation>Se interpreta el requerido como q al menos debe haber algun subelemento</a:documentation>
<ref name="requerido"/>
<optional>
<attribute name="importa-orden">
<a:documentation>Si vale '0' se impide a usuario final cambiar el orden. Valor predefinido: 1</a:documentation>
<ref name="booleano"/>
</attribute>
</optional>
<optional>
<attribute name="denominacion-elem"/>
</optional>
<element name="hijos">
<ref name="atr-contenedor"/>
<oneOrMore>
<ref name="param-grp"/>
</oneOrMore>
</element>
</group>
<group>
<a:documentation>
Almacenado como entero nativo de JSON/XML-RPC
</a:documentation>
<attribute name="tipo">
<value>entero</value>
</attribute>
<ref name="requerido"/>
<optional>
<attribute name="minimo">
<a:documentation>Valor minimo permitido (inclusivo)</a:documentation>
<data type="int"/>
</attribute>
</optional>
<optional>
<attribute name="maximo">
<a:documentation>Valor maximo permitido (inclusivo)</a:documentation>
<data type="int"/>
</attribute>
</optional>
</group>
<group>
<a:documentation>
Almacenado como double nativo de JSON/XML-RPC
</a:documentation>
<attribute name="tipo">
<value>decimal</value>
</attribute>
<ref name="requerido"/>
<optional>
<attribute name="minimo">
<a:documentation>Valor minimo permitido (inclusivo)</a:documentation>
<data type="double"/>
</attribute>
</optional>
<optional>
<attribute name="maximo">
<a:documentation>Valor maximo permitido (inclusivo)</a:documentation>
<data type="double"/>
</attribute>
</optional>
</group>
<group>
<attribute name="tipo">
<a:documentation>Se renderiza como:
- <textarea/> si lineas>1
- <input type='password'/> si contraseña=1
- <input type='text'/> 1 campo estandar edicion en caso contrario
Almacenado como string JSON estandar.
</a:documentation>
<value>texto</value>
</attribute>
<ref name="requerido"/>
<optional>
<attribute name="solo-lectura">
<a:documentation>Campo de solo lectura?. Valor predefinido es 0</a:documentation>
<ref name="booleano"/>
</attribute>
</optional>
<optional>
<attribute name="ancho">
<a:documentation>Ancho en caracteres (no se aplica a casillas)</a:documentation>
<data type="positiveInteger"/>
</attribute>
</optional>
<optional>
<attribute name="contraseña">
<a:documentation>Para ocultar valor tecleado</a:documentation>
<ref name="booleano"/>
</attribute>
</optional>
<optional>
<a:documentation>Nº de lineas. Para editar campos multilinea.</a:documentation>
<attribute name="lineas">
<a:documentation>Para ocultar valor tecleado</a:documentation>
<data type="integer">
<param name="minInclusive">1</param>
<param name="maxInclusive">50</param>
</data>
</attribute>
</optional>
<optional>
<attribute name="valor-defecto"/>
</optional>
</group>
<group>
<a:documentation>
Se renderiza como 1 combo <select/>
</a:documentation>
<attribute name="tipo">
<value>seleccionSimple</value>
</attribute>
<ref name="requerido"/>
<optional>
<attribute name="mostrar-codigo">
<a:documentation>
Valor predefinido es 1.
Ponerlo a 0 cuando descripcion ya lleve implicitamente el codigo.
</a:documentation>
<ref name="booleano"/>
</attribute>
</optional>
<optional>
<attribute name="editable">
<a:documentation>
Aparte de seleccionar valores de la lista, se puede editar valor directamente?.
Esta caracteristica no es estandar en HTML.
Valor predefinido es 0
</a:documentation>
<ref name="booleano"/>
</attribute>
</optional>
<optional>
<attribute name="ancho">
<a:documentation>Ancho en caracteres</a:documentation>
<data type="positiveInteger"/>
</attribute>
</optional>
<ref name="seleccion"/>
<optional>
<attribute name="valor-defecto"/>
</optional>
</group>
<group>
<a:documentation>
Permite seleccionar varios textos.
Almacenado como array JSON de strings: [ 'valor1', 'valor2', ... ]
Parecido a un repetidor, pero almacenado de forma + compacta, y permite solo 1 hijo.
</a:documentation>
<attribute name="tipo">
<value>seleccionMultiple</value>
</attribute>
<ref name="requerido"/>
<optional>
<attribute name="ancho">
<data type="positiveInteger"/>
</attribute>
</optional>
<ref name="seleccion"/>
</group>
<group>
<a:documentation>
Igual q seleccion simple pero con subparametros dependientes del valor.
Son siempre requeridos.
Se renderiza como 1 cuaderno cuyas solapas contienen boton de radio.
Provoca q el valor producido vaya empaquetado en estructura propia, en lugar de usar estructura padre
Si tenemos siguiente selector:
<parametro id='A' tipo='selector'>
<seleccion>
<ele id="A1">
<parametro id="B" tipo="texto"/>
<parametro id="C" tipo="texto"/>
</ele>
</seleccion>
</parametro>
Si @subestructura=0 tendremos (valor predeterminado):
<member>
<name>A</name>
<value>A1</value>
</member>
<member>
<name>B</name>
<value>Valor B</value>
</member>
<member>
<name>C</name>
<value>Valor C</value>
</member>
Si @subestructura=1 tendremos:
<member>
<name>A</name>
<value>
<struct>
<member>
<name>A</name>
<value>A1</value>
</member>
<member>
<name>B</name>
<value>Valor B</value>
</member>
<member>
<name>C</name>
<value>Valor C</value>
</member>
</struct>
</value>
</member>
Esta caracteristica se usa solo de momento en params. omitidos, y en el formato de salida de libros.
</a:documentation>
<attribute name="tipo">
<value>selector</value>
</attribute>
<optional>
<attribute name="subestructura">
<ref name="booleano"/>
</attribute>
</optional>
<element name="seleccion">
<zeroOrMore>
<element name="ele">
<attribute name="id">
<ref name="tipo-id"/>
</attribute>
<optional>
<a:documentation>Si se omite, se considera = q @id</a:documentation>
<attribute name="denominacion"/>
</optional>
<zeroOrMore>
<ref name="param-grp"/>
</zeroOrMore>
</element>
</zeroOrMore>
</element>
<optional>
<attribute name="valor-defecto"/>
</optional>
</group>
</choice>
<optional>
<a:documentation>Usado para renderizar el tooltip, explicacion adicional q puede ser algo larga.</a:documentation>
<element name="descripcion">
<text/>
</element>
</optional>
<ref name="acciones"/>
</element>
</define>
<define name="acciones">
<zeroOrMore>
<a:documentation>
Se implementa como:
- un boton al lado del control (si asociado a 1 parametro) o
- en la barra de botones (si asociado al proceso)
</a:documentation>
<element name="accion">
<a:documentation>Nombre unico de la accion. Corresponde al nombre de la funcion Javascript sin parametros a invocar</a:documentation>
<attribute name="id">
<data type="string">
<param name="pattern">[A-Za-z$_][A-Za-z$_0-9]+</param>
</data>
</attribute>
<a:documentation>Tooltip</a:documentation>
<optional>
<attribute name="descripcion"/>
</optional>
<optional>
<a:documentation>Texto q va dentro de boton</a:documentation>
<attribute name="denominacion"/>
</optional>
<optional>
<a:documentation>URL de la imagen q va dentro de boton. Sin prefijo '/img/'</a:documentation>
<attribute name="imagen"/>
</optional>
</element>
</zeroOrMore>
</define>
<define name="requerido">
<optional>
<a:documentation>Es obligatorio rellenar el parametro? Valor predeterminado es 1</a:documentation>
<attribute name="requerido">
<ref name="booleano"/>
</attribute>
</optional>
</define>
<define name="cualquier-cosa">
<zeroOrMore>
<choice>
<text/>
<element>
<anyName>
<except>
<name>seleccion</name>
</except>
</anyName>
<zeroOrMore>
<attribute>
<anyName>
<except>
<name>iden</name>
</except>
</anyName>
</attribute>
</zeroOrMore>
<ref name="cualquier-cosa"/>
</element>
</choice>
</zeroOrMore>
</define>
<define name="seleccion">
<a:documentation>Seleccion para seleccionSimple o seleccionMultiple</a:documentation>
<element name="seleccion">
<optional>
<a:documentation>Valor unico en el repetidor. Valor predeterminado es 0</a:documentation>
<attribute name="unico-en-repetidor">
<ref name="booleano"/>
</attribute>
</optional>
<choice>
<group>
<a:documentation>Especificar lista de selección dependiente del valor de otros campos ("parametros")</a:documentation>
<a:documentation>Corresponde a una URI a partir de la cual obtener los diferentes "ele"</a:documentation>
<ref name="recurso"/>
<zeroOrMore>
<ref name="arg"/>
</zeroOrMore>
</group>
<zeroOrMore>
<a:documentation>Especificación estática</a:documentation>
<element name="ele">
<attribute name="id"/>
<a:documentation>Si se omite texto, se considera = q @id</a:documentation>
<text/>
</element>
</zeroOrMore>
</choice>
</element>
</define>
<define name="recurso">
<a:documentation>URI de recurso externo, no debe contener caracteres especiales en una URL</a:documentation>
<attribute name="recurso">
<data type="string">
<param name="pattern">[A-Za-z][_A-Za-z0-9\.\-]*</param>
</data>
</attribute>
</define>
<define name="tipo-id">
<a:documentation>Tipo de IDs, debe ser un IDTOKEN valido</a:documentation>
<data type="string">
<a:documentation>El # solo se usa para generar formularios con parametros omitidos, no se debe usar en nada +</a:documentation>
<param name="pattern">[A-Za-zñÑ][#_A-ZñÑa-z0-9/\.\-]*</param>
</data>
</define>
<define name="atr-contenedor">
<a:documentation>Atributos presentes en 1 contenedor: hijos, seleccion/ele, Parametros, ...</a:documentation>
<choice>
<group>
<optional>
<a:documentation>En filas independientes (predeterminado)</a:documentation>
<attribute name="posicionado">
<value>filas</value>
</attribute>
</optional>
<ref name="pos-etiq"/>
</group>
<group>
<a:documentation>
En tabla. Permite alinear verticalmente y horizontalmente diferentes elementos visuales.
Se diferencia del posicionado en filas en q alinea verticalmente.
</a:documentation>
<attribute name="posicionado">
<value>tabla</value>
</attribute>
<ref name="pos-etiq"/>
</group>
<!--group>
<a:documentation>Elementos 1 a continuacion del otro a la derecha, continuar en siguiente linea al encontrar @nue-linea='1' o cuando no cabe</a:documentation>
<attribute name="posicionado">
<value>flujo</value>
</attribute>
<ref name="pos-etiq"/>
</group-->
<group>
<a:documentation>Valor especial solo para repetidores</a:documentation>
<attribute name="posicionado">
<value>rejilla</value>
</attribute>
</group>
</choice>
</define>
<define name="pos-etiq">
<optional>
<a:documentation>Posicion etiquetas de cada control. Valido para: tabla, flujo</a:documentation>
<attribute name="pos-etiq">
<choice>
<a:documentation>Predeterminado</a:documentation>
<value>izq</value>
<value>arr</value>
</choice>
</attribute>
</optional>
</define>
<define name="posicionado-param">
<a:documentation>Atributos q controlan el posicionado de 1 grupo o 1 Parametro.
Los parametros validos dependen del @posicionado de su contenedor inmediato</a:documentation>
<optional>
<a:documentation>Empezar nueva linea (fila)?. Valido para: tabla, filas, flujo</a:documentation>
<attribute name="nue-lin">
<a:documentation>Valor predet.</a:documentation>
<ref name="booleano"/>
</attribute>
</optional>
<optional>
<a:documentation>Valor predeterminado es 1. Valido para: tabla, flujo</a:documentation>
<attribute name="colspan">
<data type="positiveInteger"/>
</attribute>
</optional>
<optional>
<a:documentation>Valor predeterminado es 1.</a:documentation>
<attribute name="rowspan">
<data type="positiveInteger"/>
</attribute>
</optional>
<!--optional>
<a:documentation>Alineacion horizontal</a:documentation>
<attribute name="alin-horiz">
<choice>
<a:documentation>Predeterminado</a:documentation>
<value>izq</value>
<value>cen</value>
<value>der</value>
</choice>
</attribute>
</optional>
<optional>
<a:documentation>Alineacion vertical</a:documentation>
<attribute name="alin-vert">
<choice>
<a:documentation>Predeterminado</a:documentation>
<value>arr</value>
<value>cen</value>
<value>aba</value>
</choice>
</attribute>
</optional-->
</define>
<define name="booleano">
<choice>
<value>0</value>
<value>1</value>
</choice>
</define>
<define name="arg">
<element name="param">
<a:documentation>Valor variable q depende del valor de otro parametro</a:documentation>
<choice>
<a:documentation>Hace referencia al valor de un parámetro ya existente</a:documentation>
<attribute name="ref">
<!--data type="IDREF"/-->
<ref name='tipo-id'/>
</attribute>
<a:documentation>Valor fijo dado directamente</a:documentation>
<attribute name="val"/>
</choice>
</element>
</define>
</grammar>
The only errors that I get reported in the "Problems view" are: "start" contains "group" multiple times, but with no info about column and line numbers.

I'm using Oxygen 7.2 under Windows server 2003, Java 1.5.x and Eclipse 3.2.
Any hint will be very well welcome.
<grammar
xmlns="http://relaxng.org/ns/structure/1.0"
xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0"
datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
<start>
<ref name="proceso"/>
</start>
<define name="proceso">
<a:documentation>Definicion de proceso RIMA con sus parametros. Con esta info se puede renderizar 1 formulario.</a:documentation>
<element name="proceso">
<a:documentation>Nombre del proceso. Se usa para generar el titulo.</a:documentation>
<attribute name="denominacion"/>
<optional>
<a:documentation>Modo de mostrar resultado de ejecucion del proceso.</a:documentation>
<attribute name="modo">
<choice>
<a:documentation>Mostrar salida proceso en misma pagina. Valor predefinido.</a:documentation>
<value>normal</value>
<a:documentation>Mostrar salida proceso en otra pagina</a:documentation>
<value>nue-pag</value>
<a:documentation>
Validar antes en servidor.
Util en estos casos:
- Cuando pueden haber errores no facilmente validables en el cliente.
- Tambien sirve para evitar no mostrar la salida del proceso (en caso de q no sea interesante) y redireccionar a otra URL.
La existencia de 1 parametro de tipo repetidor2fases, fuerza el valor a 1
</a:documentation>
<value>validar-antes</value>
</choice>
</attribute>
</optional>
<optional>
<a:documentation>
Definicion de plantilla? En tal caso se pueden definir parametros omitibles, q se deberan rellenar en 1 2ª fase.
Valor predefinido: 0
</a:documentation>
<attribute name="def-plant">
<ref name="booleano"/>
</attribute>
</optional>
<optional>
<a:documentation>Script adicional necesario, sin extension ni ruta. Usado para poner codigo de por ej. botones de accion</a:documentation>
<attribute name="script-adicional"/>
</optional>
<ref name="acciones"/>
<optional>
<a:documentation>Datos iniciales en formato JSON a cargar en controles. Debe corresponder a 1 objeto entre llaves</a:documentation>
<element name="valor">
<data type="string">
<!--param name="pattern">\{.*\}</param-->
</data>
</element>
</optional>
<optional>
<a:documentation>Info a enviar extra al servidor aparte de la introducida por el usuario. En formato JSON.</a:documentation>
<element name="info-extra">
<data type="string">
<!--param name="pattern">\{.*\}</param-->
</data>
</element>
</optional>
</element>
<element name="parametros">
<ref name="atr-contenedor"/>
</element>
</define>
<define name="param-grp">
<a:documentation>Un parametro o 1 grupo</a:documentation>
<choice>
<element name="grupo">
<optional>
<attribute name="denominacion"/>
</optional>
<ref name="posicionado-param"/>
<ref name="atr-contenedor"/>
<optional>
<a:documentation>Descripcion ampliada usada para 'tooltip'</a:documentation>
<element name="descripcion"><text/></element>
</optional>
<zeroOrMore>
<a:documentation>Podemos tener grupos vacios q sirven para generar huecos en el posicionado</a:documentation>
<ref name="param-grp"/>
</zeroOrMore>
</element>
<a:documentation>Explicacion en HTML.</a:documentation>
<element name="explicacion">
<ref name="cualquier-cosa"/>
</element>
<ref name="param"/>
</choice>
</define>
<define name="param">
<element name="parametro">
<optional>
<a:documentation>Es omitible el parametro?. Solo se hace caso cuando proceso/@def-plant=1</a:documentation>
<attribute name="omitible">
<ref name="booleano"/>
</attribute>
</optional>
<ref name="posicionado-param"/>
<attribute name="id">
<a:documentation>Debe ser identificador valido de HTML</a:documentation>
<ref name='tipo-id'/>
</attribute>
<a:documentation>Usado para fabricar etiqueta del control asociado</a:documentation>
<attribute name="denominacion"/>
<optional>
<a:documentation>Valor predefinido para fabricar etiqueta de parametro omitido.
Interesante cuando denominacion tiene 1 valor parco como por ej. "", pues se sobreentiende etiqueta de control vecino.
</a:documentation>
<attribute name="denominacion-omitido"/>
</optional>
<choice>
<a:documentation>
@tipo determina el tipo de parametro del q se trata, y posible info especifica
al tipo del parametro.
</a:documentation>
<group>
<a:documentation>
Fecha sin hora.
Almacenado como texto en formato ISO como '2006-12-30'.
</a:documentation>
<attribute name="tipo">
<value>fecha</value>
</attribute>
<ref name="requerido"/>
</group>
<group>
<a:documentation>
Renderizado como <input type="checkbox"/>
Almacenado como true|false. Tipo nativo JSON/XML-RPC.
</a:documentation>
<attribute name="tipo">
<value>booleano</value>
</attribute>
<attribute name="valor-defecto">
<ref name="booleano"/>
</attribute>
</group>
<group>
<a:documentation>
Para introducir visualmente colores.
Almacenado como {r:255,g:255,b:255} en el caso del blanco.
</a:documentation>
<attribute name="tipo">
<value>color</value>
</attribute>
<ref name="requerido"/>
</group>
<group>
<a:documentation>
Interesante cuando los datos a editar varian en funcion de otras selecciones.
Se puede editar in situ o a través de ventana emergente q aparece tras picar 1 boton.
Almacenado como struct JSON/XML-RPC:
{ hijo1: valor1, hijo2: valor2, ....}
</a:documentation>
<attribute name="tipo">
<value>dinamico</value>
</attribute>
<optional>
<a:documentation>
2 modos de trabajo:
- emergente, se edita en ventana emergente separada
- en situ, no se edita aparte
Valor predeterminado es 1.
</a:documentation>
<attribute name="emerg">
<ref name="booleano"/>
</attribute>
</optional>
<ref name="requerido"/>
<optional>
<a:documentation>
Formulas para dinamicos emergentes.
Trozo codigo javascript q obtiene descripcion a partir de datos JSON (q son referenciados como 'd' en el codigo).
Dicho codigo debe terminar en 1 return q devuelva 1 valor textual.
Se interpreta devolver null o '' como borrar datos existentes.
Si se omite formula para 1 parametro dinamico, se usa descripcion del tipo:
* nombre parametro1: valor1
* nombre parametro2: valor2
</a:documentation>
<element name="formula-descripcion">
<attribute name="id">
<ref name="tipo-id"/>
</attribute>
<text/>
</element>
</optional>
<element name="seleccion">
<a:documentation>
Define la URI q define formulario emergente edicion parametros, q puede tener partes fijas y dependencias del valor de otros parametros
Dicha URI no debe contener extension, se añade .emerg o .din según convenga.
Parametros q estén dentro de ?d={} se literalizan automaticamente.
</a:documentation>
<oneOrMore>
<ref name="arg"/>
</oneOrMore>
</element>
</group>
<group>
<a:documentation>Como 1 repetidor, pero edicion no es en situ sino en dialogo aparte</a:documentation>
<attribute name="tipo">
<value>repetidor2fases</value>
</attribute>
<a:documentation>
URI del proceso con el q editar/insertar/borrar datos. Puede ser relativa (caso habitual) o absoluta.
Debe ser 1 proceso derivado de ProcesoEdicionTabla o debe dar funcionalidad equivalente.
Antes de editar subelemento, se guarda el conjunto del formulario.
Ideal para editar tablas con relaciones padre/hijo.
No tiene extension
</a:documentation>
<attribute name="proceso"/>
<a:documentation>Determina los elementos (filas) q contiene</a:documentation>
<element name="seleccion">
<attribute name="recurso"/>
<zeroOrMore>
<a:documentation>Estos parametros definen como obtener datos</a:documentation>
<element name="param">
<choice>
<group>
<a:documentation>De donde sacar el parametro</a:documentation>
<attribute name="ref"/>
<a:documentation>De donde sacar el parametro</a:documentation>
<attribute name="destino"/>
</group>
<group>
<attribute name="val"/>
</group>
</choice>
</element>
</zeroOrMore>
</element>
<a:documentation>Determina los atributos a mostrar de cada elemento (columnas)</a:documentation>
<element name="hijos">
<oneOrMore>
<element name="parametro">
<attribute name="id">
<ref name='tipo-id'/>
</attribute>
<attribute name="denominacion"/>
<optional>
<a:documentation>El atributo en cuestion es clave?. Valor predeterminado es '0'</a:documentation>
<attribute name="clave">
<ref name="booleano"/>
</attribute>
</optional>
</element>
</oneOrMore>
</element>
</group>
<group>
<a:documentation>
Equivalente al repeater de XForms, permite editar listas de valores arbitrarias.
Almacenado como array de objetos JSON:
[ { hijo1: valor1.1, hijo2: valor1.2, ...}, { hijo1: valor2.1, hijo2: valor2.2, ...}, .... ]
</a:documentation>
<attribute name="tipo">
<value>repetidor</value>
</attribute>
<a:documentation>Se interpreta el requerido como q al menos debe haber algun subelemento</a:documentation>
<ref name="requerido"/>
<optional>
<attribute name="importa-orden">
<a:documentation>Si vale '0' se impide a usuario final cambiar el orden. Valor predefinido: 1</a:documentation>
<ref name="booleano"/>
</attribute>
</optional>
<optional>
<attribute name="denominacion-elem"/>
</optional>
<element name="hijos">
<ref name="atr-contenedor"/>
<oneOrMore>
<ref name="param-grp"/>
</oneOrMore>
</element>
</group>
<group>
<a:documentation>
Almacenado como entero nativo de JSON/XML-RPC
</a:documentation>
<attribute name="tipo">
<value>entero</value>
</attribute>
<ref name="requerido"/>
<optional>
<attribute name="minimo">
<a:documentation>Valor minimo permitido (inclusivo)</a:documentation>
<data type="int"/>
</attribute>
</optional>
<optional>
<attribute name="maximo">
<a:documentation>Valor maximo permitido (inclusivo)</a:documentation>
<data type="int"/>
</attribute>
</optional>
</group>
<group>
<a:documentation>
Almacenado como double nativo de JSON/XML-RPC
</a:documentation>
<attribute name="tipo">
<value>decimal</value>
</attribute>
<ref name="requerido"/>
<optional>
<attribute name="minimo">
<a:documentation>Valor minimo permitido (inclusivo)</a:documentation>
<data type="double"/>
</attribute>
</optional>
<optional>
<attribute name="maximo">
<a:documentation>Valor maximo permitido (inclusivo)</a:documentation>
<data type="double"/>
</attribute>
</optional>
</group>
<group>
<attribute name="tipo">
<a:documentation>Se renderiza como:
- <textarea/> si lineas>1
- <input type='password'/> si contraseña=1
- <input type='text'/> 1 campo estandar edicion en caso contrario
Almacenado como string JSON estandar.
</a:documentation>
<value>texto</value>
</attribute>
<ref name="requerido"/>
<optional>
<attribute name="solo-lectura">
<a:documentation>Campo de solo lectura?. Valor predefinido es 0</a:documentation>
<ref name="booleano"/>
</attribute>
</optional>
<optional>
<attribute name="ancho">
<a:documentation>Ancho en caracteres (no se aplica a casillas)</a:documentation>
<data type="positiveInteger"/>
</attribute>
</optional>
<optional>
<attribute name="contraseña">
<a:documentation>Para ocultar valor tecleado</a:documentation>
<ref name="booleano"/>
</attribute>
</optional>
<optional>
<a:documentation>Nº de lineas. Para editar campos multilinea.</a:documentation>
<attribute name="lineas">
<a:documentation>Para ocultar valor tecleado</a:documentation>
<data type="integer">
<param name="minInclusive">1</param>
<param name="maxInclusive">50</param>
</data>
</attribute>
</optional>
<optional>
<attribute name="valor-defecto"/>
</optional>
</group>
<group>
<a:documentation>
Se renderiza como 1 combo <select/>
</a:documentation>
<attribute name="tipo">
<value>seleccionSimple</value>
</attribute>
<ref name="requerido"/>
<optional>
<attribute name="mostrar-codigo">
<a:documentation>
Valor predefinido es 1.
Ponerlo a 0 cuando descripcion ya lleve implicitamente el codigo.
</a:documentation>
<ref name="booleano"/>
</attribute>
</optional>
<optional>
<attribute name="editable">
<a:documentation>
Aparte de seleccionar valores de la lista, se puede editar valor directamente?.
Esta caracteristica no es estandar en HTML.
Valor predefinido es 0
</a:documentation>
<ref name="booleano"/>
</attribute>
</optional>
<optional>
<attribute name="ancho">
<a:documentation>Ancho en caracteres</a:documentation>
<data type="positiveInteger"/>
</attribute>
</optional>
<ref name="seleccion"/>
<optional>
<attribute name="valor-defecto"/>
</optional>
</group>
<group>
<a:documentation>
Permite seleccionar varios textos.
Almacenado como array JSON de strings: [ 'valor1', 'valor2', ... ]
Parecido a un repetidor, pero almacenado de forma + compacta, y permite solo 1 hijo.
</a:documentation>
<attribute name="tipo">
<value>seleccionMultiple</value>
</attribute>
<ref name="requerido"/>
<optional>
<attribute name="ancho">
<data type="positiveInteger"/>
</attribute>
</optional>
<ref name="seleccion"/>
</group>
<group>
<a:documentation>
Igual q seleccion simple pero con subparametros dependientes del valor.
Son siempre requeridos.
Se renderiza como 1 cuaderno cuyas solapas contienen boton de radio.
Provoca q el valor producido vaya empaquetado en estructura propia, en lugar de usar estructura padre
Si tenemos siguiente selector:
<parametro id='A' tipo='selector'>
<seleccion>
<ele id="A1">
<parametro id="B" tipo="texto"/>
<parametro id="C" tipo="texto"/>
</ele>
</seleccion>
</parametro>
Si @subestructura=0 tendremos (valor predeterminado):
<member>
<name>A</name>
<value>A1</value>
</member>
<member>
<name>B</name>
<value>Valor B</value>
</member>
<member>
<name>C</name>
<value>Valor C</value>
</member>
Si @subestructura=1 tendremos:
<member>
<name>A</name>
<value>
<struct>
<member>
<name>A</name>
<value>A1</value>
</member>
<member>
<name>B</name>
<value>Valor B</value>
</member>
<member>
<name>C</name>
<value>Valor C</value>
</member>
</struct>
</value>
</member>
Esta caracteristica se usa solo de momento en params. omitidos, y en el formato de salida de libros.
</a:documentation>
<attribute name="tipo">
<value>selector</value>
</attribute>
<optional>
<attribute name="subestructura">
<ref name="booleano"/>
</attribute>
</optional>
<element name="seleccion">
<zeroOrMore>
<element name="ele">
<attribute name="id">
<ref name="tipo-id"/>
</attribute>
<optional>
<a:documentation>Si se omite, se considera = q @id</a:documentation>
<attribute name="denominacion"/>
</optional>
<zeroOrMore>
<ref name="param-grp"/>
</zeroOrMore>
</element>
</zeroOrMore>
</element>
<optional>
<attribute name="valor-defecto"/>
</optional>
</group>
</choice>
<optional>
<a:documentation>Usado para renderizar el tooltip, explicacion adicional q puede ser algo larga.</a:documentation>
<element name="descripcion">
<text/>
</element>
</optional>
<ref name="acciones"/>
</element>
</define>
<define name="acciones">
<zeroOrMore>
<a:documentation>
Se implementa como:
- un boton al lado del control (si asociado a 1 parametro) o
- en la barra de botones (si asociado al proceso)
</a:documentation>
<element name="accion">
<a:documentation>Nombre unico de la accion. Corresponde al nombre de la funcion Javascript sin parametros a invocar</a:documentation>
<attribute name="id">
<data type="string">
<param name="pattern">[A-Za-z$_][A-Za-z$_0-9]+</param>
</data>
</attribute>
<a:documentation>Tooltip</a:documentation>
<optional>
<attribute name="descripcion"/>
</optional>
<optional>
<a:documentation>Texto q va dentro de boton</a:documentation>
<attribute name="denominacion"/>
</optional>
<optional>
<a:documentation>URL de la imagen q va dentro de boton. Sin prefijo '/img/'</a:documentation>
<attribute name="imagen"/>
</optional>
</element>
</zeroOrMore>
</define>
<define name="requerido">
<optional>
<a:documentation>Es obligatorio rellenar el parametro? Valor predeterminado es 1</a:documentation>
<attribute name="requerido">
<ref name="booleano"/>
</attribute>
</optional>
</define>
<define name="cualquier-cosa">
<zeroOrMore>
<choice>
<text/>
<element>
<anyName>
<except>
<name>seleccion</name>
</except>
</anyName>
<zeroOrMore>
<attribute>
<anyName>
<except>
<name>iden</name>
</except>
</anyName>
</attribute>
</zeroOrMore>
<ref name="cualquier-cosa"/>
</element>
</choice>
</zeroOrMore>
</define>
<define name="seleccion">
<a:documentation>Seleccion para seleccionSimple o seleccionMultiple</a:documentation>
<element name="seleccion">
<optional>
<a:documentation>Valor unico en el repetidor. Valor predeterminado es 0</a:documentation>
<attribute name="unico-en-repetidor">
<ref name="booleano"/>
</attribute>
</optional>
<choice>
<group>
<a:documentation>Especificar lista de selección dependiente del valor de otros campos ("parametros")</a:documentation>
<a:documentation>Corresponde a una URI a partir de la cual obtener los diferentes "ele"</a:documentation>
<ref name="recurso"/>
<zeroOrMore>
<ref name="arg"/>
</zeroOrMore>
</group>
<zeroOrMore>
<a:documentation>Especificación estática</a:documentation>
<element name="ele">
<attribute name="id"/>
<a:documentation>Si se omite texto, se considera = q @id</a:documentation>
<text/>
</element>
</zeroOrMore>
</choice>
</element>
</define>
<define name="recurso">
<a:documentation>URI de recurso externo, no debe contener caracteres especiales en una URL</a:documentation>
<attribute name="recurso">
<data type="string">
<param name="pattern">[A-Za-z][_A-Za-z0-9\.\-]*</param>
</data>
</attribute>
</define>
<define name="tipo-id">
<a:documentation>Tipo de IDs, debe ser un IDTOKEN valido</a:documentation>
<data type="string">
<a:documentation>El # solo se usa para generar formularios con parametros omitidos, no se debe usar en nada +</a:documentation>
<param name="pattern">[A-Za-zñÑ][#_A-ZñÑa-z0-9/\.\-]*</param>
</data>
</define>
<define name="atr-contenedor">
<a:documentation>Atributos presentes en 1 contenedor: hijos, seleccion/ele, Parametros, ...</a:documentation>
<choice>
<group>
<optional>
<a:documentation>En filas independientes (predeterminado)</a:documentation>
<attribute name="posicionado">
<value>filas</value>
</attribute>
</optional>
<ref name="pos-etiq"/>
</group>
<group>
<a:documentation>
En tabla. Permite alinear verticalmente y horizontalmente diferentes elementos visuales.
Se diferencia del posicionado en filas en q alinea verticalmente.
</a:documentation>
<attribute name="posicionado">
<value>tabla</value>
</attribute>
<ref name="pos-etiq"/>
</group>
<!--group>
<a:documentation>Elementos 1 a continuacion del otro a la derecha, continuar en siguiente linea al encontrar @nue-linea='1' o cuando no cabe</a:documentation>
<attribute name="posicionado">
<value>flujo</value>
</attribute>
<ref name="pos-etiq"/>
</group-->
<group>
<a:documentation>Valor especial solo para repetidores</a:documentation>
<attribute name="posicionado">
<value>rejilla</value>
</attribute>
</group>
</choice>
</define>
<define name="pos-etiq">
<optional>
<a:documentation>Posicion etiquetas de cada control. Valido para: tabla, flujo</a:documentation>
<attribute name="pos-etiq">
<choice>
<a:documentation>Predeterminado</a:documentation>
<value>izq</value>
<value>arr</value>
</choice>
</attribute>
</optional>
</define>
<define name="posicionado-param">
<a:documentation>Atributos q controlan el posicionado de 1 grupo o 1 Parametro.
Los parametros validos dependen del @posicionado de su contenedor inmediato</a:documentation>
<optional>
<a:documentation>Empezar nueva linea (fila)?. Valido para: tabla, filas, flujo</a:documentation>
<attribute name="nue-lin">
<a:documentation>Valor predet.</a:documentation>
<ref name="booleano"/>
</attribute>
</optional>
<optional>
<a:documentation>Valor predeterminado es 1. Valido para: tabla, flujo</a:documentation>
<attribute name="colspan">
<data type="positiveInteger"/>
</attribute>
</optional>
<optional>
<a:documentation>Valor predeterminado es 1.</a:documentation>
<attribute name="rowspan">
<data type="positiveInteger"/>
</attribute>
</optional>
<!--optional>
<a:documentation>Alineacion horizontal</a:documentation>
<attribute name="alin-horiz">
<choice>
<a:documentation>Predeterminado</a:documentation>
<value>izq</value>
<value>cen</value>
<value>der</value>
</choice>
</attribute>
</optional>
<optional>
<a:documentation>Alineacion vertical</a:documentation>
<attribute name="alin-vert">
<choice>
<a:documentation>Predeterminado</a:documentation>
<value>arr</value>
<value>cen</value>
<value>aba</value>
</choice>
</attribute>
</optional-->
</define>
<define name="booleano">
<choice>
<value>0</value>
<value>1</value>
</choice>
</define>
<define name="arg">
<element name="param">
<a:documentation>Valor variable q depende del valor de otro parametro</a:documentation>
<choice>
<a:documentation>Hace referencia al valor de un parámetro ya existente</a:documentation>
<attribute name="ref">
<!--data type="IDREF"/-->
<ref name='tipo-id'/>
</attribute>
<a:documentation>Valor fijo dado directamente</a:documentation>
<attribute name="val"/>
</choice>
</element>
</define>
</grammar>
The only errors that I get reported in the "Problems view" are: "start" contains "group" multiple times, but with no info about column and line numbers.

I'm using Oxygen 7.2 under Windows server 2003, Java 1.5.x and Eclipse 3.2.
Any hint will be very well welcome.
-
- Posts: 44
- Joined: Fri Aug 05, 2005 2:18 pm
-
- Site Admin
- Posts: 2095
- Joined: Thu Jan 09, 2003 2:58 pm
Hi David,
Groups are implicit in Relax NG, that is why there is no location information.
If you look at the start pattern:
Then your proceso pattern has a structure like
which is equivalent with
And, as you get the error, a start pattern cannot contain group.
You should change the proceso pattern to be a choice of the two elements:
Best Regards,
George
Groups are implicit in Relax NG, that is why there is no location information.
If you look at the start pattern:
Code: Select all
<start>
<ref name="proceso"/>
</start>
Code: Select all
<define name="proceso">
<a:documentation>...</a:documentation>
<element name="proceso">...</element>
<element name="parametros">...</element>
</define>
Code: Select all
<define name="proceso">
<a:documentation>...</a:documentation>
<group>
<element name="proceso">...</element>
<element name="parametros">...</element>
</group>
</define>
You should change the proceso pattern to be a choice of the two elements:
Code: Select all
<define name="proceso">
<a:documentation>...</a:documentation>
<choice>
<element name="proceso">...</element>
<element name="parametros">...</element>
</choice>
</define>
George
-
- Posts: 44
- Joined: Fri Aug 05, 2005 2:18 pm
Post by DavidPérez »
Thanks a lot.
That was it.
Next time I see this error message I know the cause!
That was it.
Next time I see this error message I know the cause!
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service