XML Style-sheet question

Peter Hansen peter at engcorp.com
Mon Jul 22 20:09:20 EDT 2002


Christopher wrote:
> 
> I am working on implementing a Python program to interface with
> FileMaker 6 and I had a question.  The ability to use XML Stylesheets
> is very nice with the new FileMaker version, but I've run into a bit
> of a problem (I am in the middle of learning XML and all that entails
> but I am oblivious to some of the details).

I am going to assume that by "XML Stylesheets" you are referring to
the Extensible Stylesheet Language (XSL) and XSLT from
http://www.w3.org/Style/XSL/ .  If that is not in fact the case
you can probably ignore the rest of the response.

> that formatting).  What I want to know is if there is a way to design
> a stylesheet template so that even custom exports are formatted
> correctly.  Let me give a brief example (I know everybody is quite
> busy).

By default there is a built-in template rule (see section 5.8 of
the standard) which recursively processes all elements which are
not otherwise handled.  You should be able to override this with
your own template that does something more useful for you.

<xsl:template match="*|/">
  <xsl:apply-templates/>
</xsl:template>

Replace the contents of that template with whatever you want 
otherwise-unrecognized elements to have done to them and you 
should be all set.

-Peter



More information about the Python-list mailing list