From 384d702ac74a9b3dfed149acbcb553bf69ad30d7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ale=C5=A1=20K=C5=99enek?= Date: Wed, 19 Mar 2008 14:09:32 +0000 Subject: [PATCH] Version 2.0 of http://egee.cesnet.cz/en/Schema/LB/Attributes generated from .T rather than hand-written, follow the naming --- org.glite.lb.state-machine/Makefile | 13 +- .../interface/lb-job-attrs.xsd | 6 + .../interface/lb-job-attrs2.xsd.T | 133 +++++++++++++++++++++ .../interface/lb-job-record.xsd | 5 + 4 files changed, 156 insertions(+), 1 deletion(-) create mode 100644 org.glite.lb.state-machine/interface/lb-job-attrs2.xsd.T diff --git a/org.glite.lb.state-machine/Makefile b/org.glite.lb.state-machine/Makefile index 7803ade..a94a3b8 100644 --- a/org.glite.lb.state-machine/Makefile +++ b/org.glite.lb.state-machine/Makefile @@ -47,9 +47,11 @@ MACHINE_OBJS:=seqcode_aux.o process_event.o process_event_pbs.o process_event_co PLUGIN_LIB=glite_lb_plugin.la MACHINE_LIB=libglite_lb_statemachine.a +XSD=lb-job-attrs2.xsd + default all: compile -compile: ${MACHINE_LIB} ${PLUGIN_LIB} +compile: ${MACHINE_LIB} ${PLUGIN_LIB} ${XSD} ${PLUGIN_LIB}: ${PLUGIN_LOBJS} ${SOLINK} -o $@ ${PLUGIN_LOBJS} ${PLUGIN_LIBS} @@ -69,6 +71,7 @@ install: install -m 644 ${MACHINE_LIB} ${PREFIX}/lib ${INSTALL} -m 755 ${PLUGIN_LIB} ${PREFIX}/lib install -m 644 ${top_srcdir}/interface/lb-job-attrs.xsd ${PREFIX}/interface + install -m 644 lb-job-attrs2.xsd ${PREFIX}/interface install -m 644 ${top_srcdir}/interface/lb-job-record.xsd ${PREFIX}/interface install -m 644 ${top_srcdir}/interface/intjobstat.h ${PREFIX}/include/glite/lb install -m 644 ${top_srcdir}/interface/seqcode_aux.h ${PREFIX}/include/glite/lb @@ -88,6 +91,11 @@ clean: ${AT3} $< >$@ || rm -f $@ chmod -w $@ >/dev/null +%.xsd: %.xsd.T + rm -f $@ + ${AT3} $< >$@ || rm -f $@ + chmod -w $@ >/dev/null + %.o %.lo: %.c ${COMPILE} -c $< @@ -100,3 +108,6 @@ lb_plugin.lo: lb_plugin.c job_attrs.h job_attrs.h: lb-job-attrs.xsd job_attrs.xsl ${XSLTPROC} ../src/job_attrs.xsl $< >$@ +job_attrs2.h: lb-job-attrs2.xsd job_attrs.xsl + ${XSLTPROC} ../src/job_attrs.xsl $< >$@ + diff --git a/org.glite.lb.state-machine/interface/lb-job-attrs.xsd b/org.glite.lb.state-machine/interface/lb-job-attrs.xsd index a2a68bb..6bfb5eb 100644 --- a/org.glite.lb.state-machine/interface/lb-job-attrs.xsd +++ b/org.glite.lb.state-machine/interface/lb-job-attrs.xsd @@ -3,6 +3,12 @@ + + + + + + + + +@@@LANG: wsdl + + + + + +@@@{ + for my $s ($status->getTypesOrdered) { + my $u = uc $s; + gen qq{ \n}; + } +@@@} + + + +@@@{ +# _code_ -> ...Type + for my $n ($status->getAllFieldsOrdered) { + my $f = selectField $status $n; + if ($f->{codes}) { + my $ln = getName $f; + @ln = split /_/,$ln; + my $un = shift @ln; $un .= ucfirst shift @ln while (@ln); + gen qq{ + + +}; + + for (@{$f->{codes}}) { + my $uc = uc $_->{name}; + gen qq{ \n}; + } + gen qq{ + + +}; + } + } + +@@@} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +@@@{ +# elems + for my $n ($status->getAllFieldsOrdered) { + my $f = selectField $status $n; + my $type = getType $f; + my $name = getName $f; + + $type = 'jobtypeType' if $name eq 'jobtype'; + + @ln = split /_/,$name; + my $un = shift @ln; $un .= ucfirst shift @ln while (@ln); + + gen qq{ \n}; + + } +@@@} + + + diff --git a/org.glite.lb.state-machine/interface/lb-job-record.xsd b/org.glite.lb.state-machine/interface/lb-job-record.xsd index 2ad2683..069a42e 100644 --- a/org.glite.lb.state-machine/interface/lb-job-record.xsd +++ b/org.glite.lb.state-machine/interface/lb-job-record.xsd @@ -3,6 +3,11 @@ + +