cat <<'EOF_null.xml' > null.xml EOF_null.xml cat <<'EOF_new_service.xsl' > new_service.xsl EOF_new_service.xsl cat <<'EOF_add_flags.xsl' > add_flags.xsl EOF_add_flags.xsl cat <<'EOF_add_explanation.xsl' > add_explanation.xsl EOF_add_explanation.xsl cat <<'EOF_arg.xsl' > arg.xsl #compdef case $service in ) ;; esac _arguments \ : : : Service Flag Has both single and double quotes... May have a syntax with generated arguments call. ' ' ' ' " " ' ' \ * * ( ) [ ] * : : : -> (( \: )) ( ) case $state in esac ) ;; EOF_arg.xsl cat <<'EOF_xalan.xml' > xalan.xml _xalan local state line context typeset -A opt_args Input file XML file _files XSL Script XSL file _files Output file Output file _files Do not expand entity refs Quiet Pattern Conflicts Warnings Trace the templates as they are being called. Trace each generation event. Trace each selection event. Trace the template children as they are being processed. TraceListener class for trace extensions. Do stackdump on error. XML file _files -TEXT -HTML Use XML formatter and add XML header. -XML -HTML Use simple Text formatter. -XML -TEXT Use HTML formatter. Set a stylesheet parameter Parameter name parameter_name Parameter value Use line numbers for source document use media attribute to find stylesheet associated with a document. Explicitly use s2s=SAX or d2d=DOM to do transform. Transform flavor s2sSAX d2sDOM Print overall milliseconds transform took. URIResolver to be used to resolve URIs Class name _files EntityResolver to be used to resolve entities Class name _files ContentHandler to be used to serialize output Class name _files parameter_name $list_xsl EOF java org.apache.xalan.xslt.Process -IN $opt_args[-XSL] -XSL $list_xsl -OUT $param_list vars=(`cat $param_list`) rm -f $list_xsl $param_list compadd $vars fi return 0 ]]> EOF_xalan.xml cat <<'EOF__xalan' > _xalan #compdef org.apache.xalan.xslt.Process local state line context typeset -A opt_args _arguments \ '-IN:XML file:_files' \ '-XSL:XSL file:_files' \ '-OUT:Output file:_files' \ '-E[Do not expand entity refs]' \ '-QC[Quiet Pattern Conflicts Warnings]' \ '-TT[Trace the templates as they are being called.]' \ '-TG[Trace each generation event.]' \ '-TS[Trace each selection event.]' \ '-TTC[Trace the template children as they are being processed.]' \ '-TCLASS[TraceListener class for trace extensions.]' \ '-EDUMP[Do stackdump on error.]:XML file:_files' \ '(-TEXT -HTML)-XML[Use XML formatter and add XML header.]' \ '(-XML -HTML)-TEXT[Use simple Text formatter.]' \ '(-XML -TEXT)-HTML[Use HTML formatter.]' \ '*-PARAM[Set a stylesheet parameter]:Parameter name:->parameter_name:Parameter value:' \ '-L[Use line numbers for source document]' \ '-MEDIA[use media attribute to find stylesheet associated with a document.]' \ '-FLAVOR[Explicitly use s2s=SAX or d2d=DOM to do transform.]:Transform flavor:((s2s\:SAX d2s\:DOM))' \ '-DIAG[Print overall milliseconds transform took.]' \ '-URIRESOLVER[URIResolver to be used to resolve URIs]' \ '-ENTITYRESOLVER[EntityResolver to be used to resolve entities]:Class name:_files' \ '-CONTENTHANDLER[ContentHandler to be used to serialize output]:Class name:_files' case $state in parameter_name) local vars list_xsl list_xsl=/tmp/$$.list_xsl_params.xsl param_list=/tmp/$$_params.out # If the user has already specified XSL then parse that file. if (( $+opt_args[-XSL] )) ; then # $opt_args[-PARAM] ends up with a value listing all # the args to this param. separated by colons. So we get # PARAM1:param1_value:PARAM2:param2_value.... # So it should be possible to remove values from var that have # already been specified... #For now just use XSL to extract the parameter names. cat < $list_xsl EOF java org.apache.xalan.xslt.Process -IN $opt_args[-XSL] -XSL $list_xsl -OUT $param_list vars=(`cat $param_list`) rm -f $list_xsl $param_list compadd $vars fi return 0 ;; esac EOF__xalan