From owner-freebsd-doc Fri Aug 3 7: 4:27 2001 Delivered-To: freebsd-doc@freebsd.org Received: from nothing-going-on.demon.co.uk (pc-62-31-42-140-hy.blueyonder.co.uk [62.31.42.140]) by hub.freebsd.org (Postfix) with ESMTP id 8B14337B403; Fri, 3 Aug 2001 07:03:41 -0700 (PDT) (envelope-from nik@nothing-going-on.demon.co.uk) Received: (from nik@localhost) by nothing-going-on.demon.co.uk (8.11.3/8.11.3) id f736X9b33907; Fri, 3 Aug 2001 07:33:09 +0100 (BST) (envelope-from nik) Date: Fri, 3 Aug 2001 07:33:09 +0100 From: Nik Clayton To: Nik Clayton Cc: doc@freebsd.org Subject: Re: Depending on libxslt Message-ID: <20010803073308.A33872@canyon.nothing-going-on.org> References: <20010802171857.B24850@canyon.nothing-going-on.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-md5; protocol="application/pgp-signature"; boundary="cmJC7u66zC7hs+87" Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20010802171857.B24850@canyon.nothing-going-on.org>; from nik@freebsd.org on Thu, Aug 02, 2001 at 05:18:57PM +0100 Organization: FreeBSD Project Sender: owner-freebsd-doc@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org --cmJC7u66zC7hs+87 Content-Type: multipart/mixed; boundary="HlL+5n6rz5pIUxbD" Content-Disposition: inline --HlL+5n6rz5pIUxbD Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Aug 02, 2001 at 05:18:57PM +0100, Nik Clayton wrote: > 2. The newsflash announcements can become an XML document. It's then > pretty trivial to generate the newsflash HTML page automatically. > It's also even more trivial to generate an RDF file -- this is the > format used by news 'syndication' sites to share headlines and > links, so that it'll be easy to get FreeBSD news headlines on > sites like DaemonNews and Slashdot. For an example of what I'm talking about, attached is a little something I've knocked up on the flight back to the UK. It shows how we'd probably go about implementing this sort of thing. First, make sure that you have installed libsxlt from the ports collection. Then save the attached news.xsl and news.xml files somewhere. news.xsl is the stylesheet, news.xml is the data. If you take a look at news.xml you'll see that it's very simple markup. Everything is contained inside a element, which then has sub-elements for s. Each month has a , and contains s. Each event has a , and one or more

elements, which may contain elements. The

and elements are directly analogous to HTML. news.xsl is the stylesheet. It's a bit big, but don't be put off. The first 100 or so lines of news.xsl would normally be kept in a separate file, and shared amongst all the stylesheets, in the same way that we have various includes.sgml files kicking around the www/ tree. I haven't done that for this example because I'm still finding my way around XSL. =20 If you look at these lines you'll see lots of declarations. = =20 I'm using these instead of the entities we use in the SGML version because= =20 XSL doesn't make it very easy to create new entities on the fly. You can= =20 also do neat things with XSL variables. The section that starts=20 ... Is the meat of the stylesheet. This sets up the body of the HTML page, includes the headers, footers, and introductory text, and starts the processing of the data in news.xml. Notice how the stylesheet contains a mixture of XSL markup (every element that starts , and the HTML that we're going to output. Also notice how you can refer to variables in attribute lists. All the other elements contain the code that converts subtrees of the document into HTML. If you're familiar with the DSSSL stylesheets then ... is roughly equivalent to (element foo ... ) These templates are all called by the element in the main template. You can then convert news.xml to HTML by running=20 xsltproc news.xsl news.xml > news.html and then load news.html in to your browser. This works best if you run it inside the www/en/news/ directory in a checked out copy of the website, because then the images will be found as well -- that's not an absolute requirement though if you just want to see what this looks like. This isn't quite a finished solution. Apart from the fact that the first 100 or so lines need to split out in to separate files, the format of news.xml needs rethinking slightly. For example, if we were to syndicate this content in to an RDF file we really want separate headlines for the RDF. So perhaps: 17-Jun-2001 FreeBSD PowerPC reaches "mount root" milestone

Benno Rice has completed enough work to allow FreeBSD to reach the mountroot prompt on the PowerPC processor. Please see the PowerPC platform page and mailing list for more information.

The doesn't necessarily need to be included in the HTML output (although it could be). Maybe we should store the dates in an ISO format (20010617 ?)= =20 and let the XSL stylesheets convert that back in to something a bit more useful. Perhaps we want different classes of event: Any recommendations? If anyone knows of any standards for marking up 'news stories' or things like this then now would be a good time to say so :-) N --=20 FreeBSD: The Power to Serve http://www.freebsd.org/ FreeBSD Documentation Project http://www.freebsd.org/docproj/ --- 15B8 3FFC DDB4 34B0 AA5F 94B7 93A8 0764 2C37 E375 --- --HlL+5n6rz5pIUxbD Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="news.xsl" Content-Transfer-Encoding: quoted-printable =20 3D"" 3D"[New!]" @FreeB= SD.org
=3D"FreeBSD <xsl:value-of select=3D"$title"/> #000000 #FFFFFF #FFCC33 3D"Navigation =20


3D"Top"/ 3D"Applications"/ 3D"Support"/ 3D"Documentation"/=20 3D"Vendors"/ 3D"Search"/ 3D"Index"/ 3D"Top"/ 3D"Top"/


=20 =20 News Home =20 3D"FreeBSD

FreeBSD is a rapidly developing operating system. Keeping up on the latest developments can be a chore! To keep on top of things, be sure and check this page periodically. Also, you may wish to subscribe to the=20 freebsd-ann= ounce mailing list.

For latest news of FreeBSD Java Project please visit=20 FreeBSD/Java NewsFlash page.

=20

For a detailed description of past, present, and future releases, see the Release Information page.

=09

For FreeBSD Security Advisories, please refer to the=20 Security Information page.

=09 =09

Older announcements: 2000, 1999, 1998, 1997, 1996

=09

=20
  • :

  • --HlL+5n6rz5pIUxbD Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="news.xml" Content-Transfer-Encoding: quoted-printable June 2001 21-Jun-2001 =09

    New committer: Brooks Davis<= /a> (Networking, Mobile Computing)

    20-Jun-2001 =20

    John Kozubik has submitted= =20 an article explaining=20 How to use FreeBSD with solid state media.

    17-Jun-2001 =09

    Benno Rice has completed = enough work to allow FreeBSD to reach the mountroot prompt on the PowerPC processor. Please see the PowerPC platform=20 page and mailing list for more information.

    15-Jun-2001

    New committer: Mike Silbersac= k (Networking)

    14-Jun-2001

    New committer: Johann Visagie (Ports)

    13-Jun-2001

    Robert Watson has compi= led a=20 status report for the FreeBSD Project. These reports are scheduled to continue on a monthly basis.

    11-Jun-2001

    New committer: Anton Berezin<= /a> (all things Perl)

    06-Jun-2001

    New committer: David W. Chapm= an Jr. (Ports)

    06-Jun-2001

    New committer: Mark Pulford (Ports)

    01-Jun-2001

    New committer: Crist J. Clark (Networking, security)

    May 2001 24-May-2001 =20

    The famous ftp site, ftp.FreeBSD.org, is now back= in=20 full operation. Many thanks to=20 Tele= =20 Danmark, who are supplying the machine as well as the network connection.

    16-May-2001 =20

    New committer: Jim Pirzyk

    02-May-2001 =20

    The first May 2001 issue of the=20 FreeBSD 'zine is now available. Starting this month, there will be two issues per month; one on the 1st, and one on the 15th.

    April 2001 27-Apr-2001 =20

    FreeBSD now works with multiple processors on Alpha systems, thank= s to the efforts of John Baldwin, Andrew Gallatin, and Doug Rabson.

    25-Apr-2001 =20

    New committer: Takuya=20 SHIOZAKI (Internationalization)

    25-Apr-2001 =20

    New committer: Udo Erdelhoff= =20 (Docs)

    18-Apr-2001 =09

    The=20 Developer's Handbook is now available on the web site. This is an evolving resource for people wanting to develop software for FreeBSD (and not just for the committers who are developing FreeBSD). Don't forget that a complete list of documentation available from this site is also available.

    17-Apr-2001 =20

    Addison Wesley have allowed us to republish=20 Chap= ter 8 of the=20 FreeBSD Corporate Networker's Guide. Chapter 8 provides an in-depth look at providing printing services to Windows, NT, and Novell clients using FreeBSD.

    16-Apr-2001 =09

    Yet another new committer: Jens Schweikhardt (Standards compliance)

    12-Apr-2001 =09

    The April issue of The FreeBSD 'zine is now available.

    10-Apr-2001 =09

    The Ports Collection n= ow contains more than 5,000 individual entries!

    05-Apr-2001 =09

    New committer: George Reid (Sound support, ports)

    04-Apr-2001 =20

    Wind River to Acquire BSDi Software Assets. Please read the=20 Wind River Press Release, the announcement from=20 = Jordan K. Hubbard, and the=20 FreeBSD Core Team statement.

    March 2001 25-Mar-2001 =09

    New committer: Yar Tikhiy (Networking)

    24-Mar-2001 =20

    New committer: Eric Melville (System tools)

    13-Mar-2001 =20

    The March issue of The FreeBSD 'zine is now available.

    09-Mar-2001 =09

    New committer: Dima Dorfman (Docs)

    07-Mar-2001 =09

    New committer: Michael C. W= u (Internationalization, porting efforts)

    06-Mar-2001 =20

    New committer: Thomas=20 M&ouml;stl (POSIX.1e extensions)

    =20
    06-Mar-2001 =09

    New committer: Orion Hodson (Sound support)

    February 2001 20-Feb-2001 =20

    New committer: Jesper Skriver

    16-Feb-2001 =20

    The February issue of The FreeBSD 'zine is now available.

    05-Feb-2001 =09

    New committer: Mike Heffner (Audit project)

    January 2001 24-Jan-2001 =20

    New committer: Jimmy Olgeni<= /a> (Ports)

    23-Jan-2001 =09

    New committer: Dirk Meyer (Ports)

    20-Jan-2001 =09

    New committer: Ying-chieh Li= ao (Ports)

    --HlL+5n6rz5pIUxbD-- --cmJC7u66zC7hs+87 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (FreeBSD) Comment: For info see http://www.gnupg.org iEYEARECAAYFAjtqRaMACgkQk6gHZCw343XAFwCeKsgTNsScdXvqrG/t4DiSWdpq dxMAnAgGa8+jp3BQYnp88lj+0S9cZhx/ =FzxI -----END PGP SIGNATURE----- --cmJC7u66zC7hs+87-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-doc" in the body of the message