From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14037 invoked by alias); 19 Sep 2002 00:16:36 -0000 Mailing-List: contact docbook-tools-discuss-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: docbook-tools-discuss-owner@sources.redhat.com Received: (qmail 14028 invoked from network); 19 Sep 2002 00:16:34 -0000 Received: from unknown (HELO snark.thyrsus.com) (66.92.53.140) by sources.redhat.com with SMTP; 19 Sep 2002 00:16:34 -0000 Received: (from esr@localhost) by snark.thyrsus.com (8.11.6/8.11.6) id g8J0DAT26975; Wed, 18 Sep 2002 20:13:10 -0400 Date: Fri, 20 Dec 2002 19:23:00 -0000 From: "Eric S. Raymond" To: Tim Waugh , docbook-tools-discuss@sources.redhat.com Subject: I've written an xml profiling tool Message-ID: <20020919001310.GA26917@thyrsus.com> Reply-To: esr@thyrsus.com Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="oyUTqETQ0mS9luUI" Content-Disposition: inline User-Agent: Mutt/1.4i Organization: Eric Conspiracy Secret Labs X-Eric-Conspiracy: There is no conspiracy X-SW-Source: 2002/txt/msg00129.txt.bz2 --oyUTqETQ0mS9luUI Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-length: 707 I've written a little wrapper script that uses Jirka Kosek's stylesheet technique to do XML profiling. I could release it as a project, but it's so close to trivial that that seems kind of silly. Enclosed is the script and a RefEntry for it. Tim, do you want to take this into your xmlto package? Hack as you like, rename it, whatever; all I want is for something equivalent to be stock in the next Red Hat release. If you don't want it, tell me that. Then I'll go ahead and release it as a separate package. (Why the hell is conditionalization called profiling, anyway? Have I mentioned recently that XML jargon makes me nauseous?) -- Eric S. Raymond --oyUTqETQ0mS9luUI Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=xmlprofile Content-length: 1945 #!/bin/sh # # xmlprofile -- select portions of an XML document by attribute # # Trivial wrapper around Jirka Kosek's stylesheet-transform technique # for profiling XML documents. Uses xsltproc or saxon. # # Usage: xmlprofile param value file... # # by Eric S. Raymond 18 September 2002 param=$1; shift value=$1; shift files="$*" stylesheet=/usr/tmp/xmlprofile$$.xml trap "rm -f $stylesheet" 0 1 2 15 # Generate a stylesheet that know about the attribute we're passing in cat >$stylesheet < EOF # Apply the generated stylesheet using whatever XSLT engine is handy if which xsltproc >/dev/null then for file in $files do xsltproc --novalid --stringparam $param $value $stylesheet $file done elif which saxon >/dev/null then for file in $files do saxon $file $stylesheet "${param}=${value}" done else echo "xmlprofile: couldn't find an XSLT engine!" 1>&2 exit 1 fi exit 0 # End --oyUTqETQ0mS9luUI Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="xmlprofile.xml" Content-length: 1799 xmlprofile 1 Sep 18 2002 xmlprofile conditionalization (profiling) for XML documents xmlprofile attribute value file DESCRIPTION This tool supports conditionally including or excluding sections from XML documents, implementing a facility similar to SGML marked sections. To use it, specify an attribute name, a value, and a list of files. Each file will be processed in turn and the results sent to standard output. For each tag pair that has a binding of the attribute in its header tag, that tag pair and enclosed contents will be present in the output if and only if the attribute value in the tag matches the required value passed in on the xmlprofile command line. A required value matches an attribute value if either (a) they are equal strings, or (b) the attribute value contains or-bars and the required value matches one of the or-bar-separated substrings. AUTHORS The generated-stylesheet technique for profiling was invented by Jirka Kosek. This implementation is by by Eric S. Raymond esr@snark.thyrsus.com. SEE ALSO --oyUTqETQ0mS9luUI-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31671 invoked by alias); 19 Sep 2002 09:27:21 -0000 Mailing-List: contact docbook-tools-discuss-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: docbook-tools-discuss-owner@sources.redhat.com Received: (qmail 31634 invoked from network); 19 Sep 2002 09:27:14 -0000 Received: from unknown (HELO snark.thyrsus.com) (66.92.53.140) by sources.redhat.com with SMTP; 19 Sep 2002 09:27:14 -0000 Received: (from esr@localhost) by snark.thyrsus.com (8.11.6/8.11.6) id g8J9OAO31290; Thu, 19 Sep 2002 05:24:10 -0400 Date: Fri, 20 Dec 2002 19:23:00 -0000 From: "Eric S. Raymond" To: Tim Waugh Cc: docbook-tools-discuss@sources.redhat.com Subject: Re: I've written an xml profiling tool Message-ID: <20020919092410.GA31181@thyrsus.com> Reply-To: esr@thyrsus.com References: <20020919001310.GA26917@thyrsus.com> <20020919085834.GN9457@redhat.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="xHFwDpU9dbj6ez1V" Content-Disposition: inline In-Reply-To: <20020919085834.GN9457@redhat.com> User-Agent: Mutt/1.4i Organization: Eric Conspiracy Secret Labs X-Eric-Conspiracy: There is no conspiracy X-SW-Source: 2002/txt/msg00131.txt.bz2 --xHFwDpU9dbj6ez1V Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-length: 1036 Tim Waugh : > > stylesheet=3D/usr/tmp/xmlprofile$$.xml >=20 > Not in my package! I will change this to use mktemp. :-) Oh, yeah. Duh. Good call. =20 > > > > > doctype-public=3D"-//OASIS//DTD DocBook XML V4.1.2//EN" > > doctype-system=3D"http://www.oasis-open.org/docbook/xml/4.0= /docbookx.dtd"/> >=20 > I'm a bit confused about what's happening here. We don't know that > DocBook XML V4.1.2 is the correct version to use, do we? What if the > input is DocBook XML V4.2 for instance? Also, the system identifier > seems to be for a different version altogether. I don't grok XSLT yet, so I copied the skeleton for the profiling stylesheet straight from Jira Kosek's stylesheet and hacked it as little as I could. It seems to work. That's all I know. The original is at . --=20 Eric S. Raymond --xHFwDpU9dbj6ez1V Content-Type: application/pgp-signature Content-Disposition: inline Content-length: 232 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE9iZe5rfUW04Qh8RwRAnPbAKDCiDv5g1QkNvZBs5uU5twvcTWOQwCcCQoX lTx9/qo39yLhl/oM5CvcBJo= =/oyb -----END PGP SIGNATURE----- --xHFwDpU9dbj6ez1V-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24485 invoked by alias); 19 Sep 2002 08:58:45 -0000 Mailing-List: contact docbook-tools-discuss-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: docbook-tools-discuss-owner@sources.redhat.com Received: (qmail 24418 invoked from network); 19 Sep 2002 08:58:44 -0000 Received: from unknown (HELO lacrosse.corp.redhat.com) (66.187.233.200) by sources.redhat.com with SMTP; 19 Sep 2002 08:58:44 -0000 Received: from meme.surrey.redhat.com (meme.surrey.redhat.com [172.16.10.38]) by lacrosse.corp.redhat.com (8.11.6/8.9.3) with ESMTP id g8J8wbP01454; Thu, 19 Sep 2002 04:58:37 -0400 Received: from meme.surrey.redhat.com (localhost.localdomain [127.0.0.1]) by meme.surrey.redhat.com (8.12.6/8.12.5) with ESMTP id g8J8warU026722; Thu, 19 Sep 2002 09:58:36 +0100 Received: (from twaugh@localhost) by meme.surrey.redhat.com (8.12.6/8.12.6/Submit) id g8J8wZUA026720; Thu, 19 Sep 2002 09:58:35 +0100 Date: Fri, 20 Dec 2002 19:23:00 -0000 From: Tim Waugh To: "Eric S. Raymond" Cc: docbook-tools-discuss@sources.redhat.com Subject: Re: I've written an xml profiling tool Message-ID: <20020919085834.GN9457@redhat.com> References: <20020919001310.GA26917@thyrsus.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="2yB5+CA2g0IhBuTl" Content-Disposition: inline In-Reply-To: <20020919001310.GA26917@thyrsus.com> User-Agent: Mutt/1.4i X-SW-Source: 2002/txt/msg00130.txt.bz2 --2yB5+CA2g0IhBuTl Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-length: 1168 On Wed, Sep 18, 2002 at 08:13:10PM -0400, Eric S. Raymond wrote: > Enclosed is the script and a RefEntry for it. Tim, do you want to take t= his > into your xmlto package? Hack as you like, rename it, whatever; all I wa= nt > is for something equivalent to be stock in the next Red Hat release. Thanks. Yes, xmlto is probably as good a place as any. > stylesheet=3D/usr/tmp/xmlprofile$$.xml Not in my package! I will change this to use mktemp. :-) > > doctype-public=3D"-//OASIS//DTD DocBook XML V4.1.2//EN" > doctype-system=3D"http://www.oasis-open.org/docbook/xml/4.0/d= ocbookx.dtd"/> I'm a bit confused about what's happening here. We don't know that DocBook XML V4.1.2 is the correct version to use, do we? What if the input is DocBook XML V4.2 for instance? Also, the system identifier seems to be for a different version altogether. Is this intentional or an oversight? > "-//OASIS//DTD DocBook XML V4.1.2//EN" > "docbook/docbookx.dtd"> And I will change this system ID as well. Thanks, Tim. */ --2yB5+CA2g0IhBuTl Content-Type: application/pgp-signature Content-Disposition: inline Content-length: 189 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (GNU/Linux) iD8DBQE9iZG6tO8Ac4jnUq4RArA6AKCSrm2WInOTqGt4TpFc+7Ok8MLi/ACeLK/d R7Yi8E+7GiWzWp5X2Cj9Q3o= =SAVO -----END PGP SIGNATURE----- --2yB5+CA2g0IhBuTl-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14037 invoked by alias); 19 Sep 2002 00:16:36 -0000 Mailing-List: contact docbook-tools-discuss-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: docbook-tools-discuss-owner@sources.redhat.com Received: (qmail 14028 invoked from network); 19 Sep 2002 00:16:34 -0000 Received: from unknown (HELO snark.thyrsus.com) (66.92.53.140) by sources.redhat.com with SMTP; 19 Sep 2002 00:16:34 -0000 Received: (from esr@localhost) by snark.thyrsus.com (8.11.6/8.11.6) id g8J0DAT26975; Wed, 18 Sep 2002 20:13:10 -0400 Date: Wed, 18 Sep 2002 17:16:00 -0000 From: "Eric S. Raymond" To: Tim Waugh , docbook-tools-discuss@sources.redhat.com Subject: I've written an xml profiling tool Message-ID: <20020919001310.GA26917@thyrsus.com> Reply-To: esr@thyrsus.com Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="oyUTqETQ0mS9luUI" Content-Disposition: inline User-Agent: Mutt/1.4i Organization: Eric Conspiracy Secret Labs X-Eric-Conspiracy: There is no conspiracy X-SW-Source: 2002-q3/txt/msg00046.txt.bz2 Message-ID: <20020918171600.WaMcx8pI2DFeOMweDVh-Wp522l26GJz_lhKRLBEOl8k@z> --oyUTqETQ0mS9luUI Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-length: 707 I've written a little wrapper script that uses Jirka Kosek's stylesheet technique to do XML profiling. I could release it as a project, but it's so close to trivial that that seems kind of silly. Enclosed is the script and a RefEntry for it. Tim, do you want to take this into your xmlto package? Hack as you like, rename it, whatever; all I want is for something equivalent to be stock in the next Red Hat release. If you don't want it, tell me that. Then I'll go ahead and release it as a separate package. (Why the hell is conditionalization called profiling, anyway? Have I mentioned recently that XML jargon makes me nauseous?) -- Eric S. Raymond --oyUTqETQ0mS9luUI Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=xmlprofile Content-length: 1945 #!/bin/sh # # xmlprofile -- select portions of an XML document by attribute # # Trivial wrapper around Jirka Kosek's stylesheet-transform technique # for profiling XML documents. Uses xsltproc or saxon. # # Usage: xmlprofile param value file... # # by Eric S. Raymond 18 September 2002 param=$1; shift value=$1; shift files="$*" stylesheet=/usr/tmp/xmlprofile$$.xml trap "rm -f $stylesheet" 0 1 2 15 # Generate a stylesheet that know about the attribute we're passing in cat >$stylesheet < EOF # Apply the generated stylesheet using whatever XSLT engine is handy if which xsltproc >/dev/null then for file in $files do xsltproc --novalid --stringparam $param $value $stylesheet $file done elif which saxon >/dev/null then for file in $files do saxon $file $stylesheet "${param}=${value}" done else echo "xmlprofile: couldn't find an XSLT engine!" 1>&2 exit 1 fi exit 0 # End --oyUTqETQ0mS9luUI Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="xmlprofile.xml" Content-length: 1799 xmlprofile 1 Sep 18 2002 xmlprofile conditionalization (profiling) for XML documents xmlprofile attribute value file DESCRIPTION This tool supports conditionally including or excluding sections from XML documents, implementing a facility similar to SGML marked sections. To use it, specify an attribute name, a value, and a list of files. Each file will be processed in turn and the results sent to standard output. For each tag pair that has a binding of the attribute in its header tag, that tag pair and enclosed contents will be present in the output if and only if the attribute value in the tag matches the required value passed in on the xmlprofile command line. A required value matches an attribute value if either (a) they are equal strings, or (b) the attribute value contains or-bars and the required value matches one of the or-bar-separated substrings. AUTHORS The generated-stylesheet technique for profiling was invented by Jirka Kosek. This implementation is by by Eric S. Raymond esr@snark.thyrsus.com. SEE ALSO --oyUTqETQ0mS9luUI-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24485 invoked by alias); 19 Sep 2002 08:58:45 -0000 Mailing-List: contact docbook-tools-discuss-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: docbook-tools-discuss-owner@sources.redhat.com Received: (qmail 24418 invoked from network); 19 Sep 2002 08:58:44 -0000 Received: from unknown (HELO lacrosse.corp.redhat.com) (66.187.233.200) by sources.redhat.com with SMTP; 19 Sep 2002 08:58:44 -0000 Received: from meme.surrey.redhat.com (meme.surrey.redhat.com [172.16.10.38]) by lacrosse.corp.redhat.com (8.11.6/8.9.3) with ESMTP id g8J8wbP01454; Thu, 19 Sep 2002 04:58:37 -0400 Received: from meme.surrey.redhat.com (localhost.localdomain [127.0.0.1]) by meme.surrey.redhat.com (8.12.6/8.12.5) with ESMTP id g8J8warU026722; Thu, 19 Sep 2002 09:58:36 +0100 Received: (from twaugh@localhost) by meme.surrey.redhat.com (8.12.6/8.12.6/Submit) id g8J8wZUA026720; Thu, 19 Sep 2002 09:58:35 +0100 Date: Thu, 19 Sep 2002 01:58:00 -0000 From: Tim Waugh To: "Eric S. Raymond" Cc: docbook-tools-discuss@sources.redhat.com Subject: Re: I've written an xml profiling tool Message-ID: <20020919085834.GN9457@redhat.com> References: <20020919001310.GA26917@thyrsus.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="2yB5+CA2g0IhBuTl" Content-Disposition: inline In-Reply-To: <20020919001310.GA26917@thyrsus.com> User-Agent: Mutt/1.4i X-SW-Source: 2002-q3/txt/msg00047.txt.bz2 Message-ID: <20020919015800.M38WL7Zmz_MSJCvQkBqoyDREK51aloeXeJRshSjaHKk@z> --2yB5+CA2g0IhBuTl Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-length: 1168 On Wed, Sep 18, 2002 at 08:13:10PM -0400, Eric S. Raymond wrote: > Enclosed is the script and a RefEntry for it. Tim, do you want to take t= his > into your xmlto package? Hack as you like, rename it, whatever; all I wa= nt > is for something equivalent to be stock in the next Red Hat release. Thanks. Yes, xmlto is probably as good a place as any. > stylesheet=3D/usr/tmp/xmlprofile$$.xml Not in my package! I will change this to use mktemp. :-) > > doctype-public=3D"-//OASIS//DTD DocBook XML V4.1.2//EN" > doctype-system=3D"http://www.oasis-open.org/docbook/xml/4.0/d= ocbookx.dtd"/> I'm a bit confused about what's happening here. We don't know that DocBook XML V4.1.2 is the correct version to use, do we? What if the input is DocBook XML V4.2 for instance? Also, the system identifier seems to be for a different version altogether. Is this intentional or an oversight? > "-//OASIS//DTD DocBook XML V4.1.2//EN" > "docbook/docbookx.dtd"> And I will change this system ID as well. Thanks, Tim. */ --2yB5+CA2g0IhBuTl Content-Type: application/pgp-signature Content-Disposition: inline Content-length: 189 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (GNU/Linux) iD8DBQE9iZG6tO8Ac4jnUq4RArA6AKCSrm2WInOTqGt4TpFc+7Ok8MLi/ACeLK/d R7Yi8E+7GiWzWp5X2Cj9Q3o= =SAVO -----END PGP SIGNATURE----- --2yB5+CA2g0IhBuTl-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31671 invoked by alias); 19 Sep 2002 09:27:21 -0000 Mailing-List: contact docbook-tools-discuss-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: docbook-tools-discuss-owner@sources.redhat.com Received: (qmail 31634 invoked from network); 19 Sep 2002 09:27:14 -0000 Received: from unknown (HELO snark.thyrsus.com) (66.92.53.140) by sources.redhat.com with SMTP; 19 Sep 2002 09:27:14 -0000 Received: (from esr@localhost) by snark.thyrsus.com (8.11.6/8.11.6) id g8J9OAO31290; Thu, 19 Sep 2002 05:24:10 -0400 Date: Thu, 19 Sep 2002 02:27:00 -0000 From: "Eric S. Raymond" To: Tim Waugh Cc: docbook-tools-discuss@sources.redhat.com Subject: Re: I've written an xml profiling tool Message-ID: <20020919092410.GA31181@thyrsus.com> Reply-To: esr@thyrsus.com References: <20020919001310.GA26917@thyrsus.com> <20020919085834.GN9457@redhat.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="xHFwDpU9dbj6ez1V" Content-Disposition: inline In-Reply-To: <20020919085834.GN9457@redhat.com> User-Agent: Mutt/1.4i Organization: Eric Conspiracy Secret Labs X-Eric-Conspiracy: There is no conspiracy X-SW-Source: 2002-q3/txt/msg00048.txt.bz2 Message-ID: <20020919022700._tZjFgqq9gEd9fWKFl0nSGLbDSLUoleSxeqb3UaEaBc@z> --xHFwDpU9dbj6ez1V Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-length: 1036 Tim Waugh : > > stylesheet=3D/usr/tmp/xmlprofile$$.xml >=20 > Not in my package! I will change this to use mktemp. :-) Oh, yeah. Duh. Good call. =20 > > > > > doctype-public=3D"-//OASIS//DTD DocBook XML V4.1.2//EN" > > doctype-system=3D"http://www.oasis-open.org/docbook/xml/4.0= /docbookx.dtd"/> >=20 > I'm a bit confused about what's happening here. We don't know that > DocBook XML V4.1.2 is the correct version to use, do we? What if the > input is DocBook XML V4.2 for instance? Also, the system identifier > seems to be for a different version altogether. I don't grok XSLT yet, so I copied the skeleton for the profiling stylesheet straight from Jira Kosek's stylesheet and hacked it as little as I could. It seems to work. That's all I know. The original is at . --=20 Eric S. Raymond --xHFwDpU9dbj6ez1V Content-Type: application/pgp-signature Content-Disposition: inline Content-length: 232 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE9iZe5rfUW04Qh8RwRAnPbAKDCiDv5g1QkNvZBs5uU5twvcTWOQwCcCQoX lTx9/qo39yLhl/oM5CvcBJo= =/oyb -----END PGP SIGNATURE----- --xHFwDpU9dbj6ez1V--