From: joseito@poczta.onet.pl
To: help-gnu-emacs@gnu.org
Subject: Re: XML mode with XSD schema support?
Date: Wed, 18 Jun 2008 12:35:56 -0700 (PDT) [thread overview]
Message-ID: <c147c80e-d57b-4da9-96af-a3f18a7b51cd@m36g2000hse.googlegroups.com> (raw)
In-Reply-To: a66d40e5-2c67-4768-a9a9-8fa29ef29d79@a1g2000hsb.googlegroups.com
On 18 Cze, 13:04, Steffen Sledz <sl...@zone42.org> wrote:
(...)
> The only mode i found was nXMLMode. It is very comfortable but it
> supports only Relax NG schemas. :(
Almost always it's possible to transform XSD into RNC. I have set up
myself a tool-chain for doing it using java, rngconv, trang and the
following shell script:
--- cut here: begin --------------------------------------
#!/bin/bash
if [ $# = 0 ]; then
echo "Usage: rnc /path/to/XSD/schema/to/convert/to/RNC"
exit 1
fi
if [ ! -f $1 ]; then
echo "No such file: $1"
exit 2
fi
DIR=`echo $0 | sed -e "s/[^/]*$//"`
FILE="$DIR../`echo $1 | awk -F/ '{print $NF}' | cut -d. -f1`.rnc"
if [ -f $FILE ]; then
echo "ERROR: File exists: $FILE"
exit 3
fi
CLASSPATH=$CLASSPATH:$DIR
java -jar $DIR/rngconv.jar $1 > $DIR/fifo | java -jar $DIR/trang.jar -
I rng -O rnc $DIR/fifo $FILE
if [ -f $FILE ]; then
echo "OK: New RNC schema saved as $FILE"
else
echo "ERROR: Errors found, see stderr for details"
fi
--- cut here: end --------------------------------------
If you put this together with all the java dependencies in a directory
~/rnc/conv, you can execute it from anywhere inside your filesystem
and you get the converted schema in ~/rnc.
Good luck :)
--
José A. Romero L.
joseito (at) poczta (dot) onet (dot) pl
"We who cut mere stones must always be envisioning cathedrals."
(Quarry worker's creed)
next parent reply other threads:[~2008-06-18 19:35 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <a66d40e5-2c67-4768-a9a9-8fa29ef29d79@a1g2000hsb.googlegroups.com>
2008-06-18 19:35 ` joseito [this message]
2008-06-20 6:28 ` XML mode with XSD schema support? Steffen Sledz
2008-06-20 6:43 ` joseito
2008-06-25 8:00 ` Steffen Sledz
2008-06-18 6:26 Steffen Sledz
2008-06-18 13:27 ` Drew Adams
2008-06-18 14:13 ` Lennart Borgman (gmail)
2008-06-18 16:17 ` Drew Adams
[not found] ` <mailman.13506.1213798474.18990.help-gnu-emacs@gnu.org>
2008-06-18 14:32 ` Steffen Sledz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c147c80e-d57b-4da9-96af-a3f18a7b51cd@m36g2000hse.googlegroups.com \
--to=joseito@poczta.onet.pl \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.