This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: Transforming an XML document linked to a XML schema
- From: Joerg Pietschmann <joerg dot pietschmann at zkb dot ch>
- To: XSL List <xsl-list at lists dot mulberrytech dot com>
- Date: Wed, 30 Jan 2002 10:21:05 +0100
- Subject: Re: [xsl] Transforming an XML document linked to a XML schema
- Organization: ZKB
- Reply-to: xsl-list at lists dot mulberrytech dot com
"Purnima Fernando" <Purnima.Fernando@TodaySystems.com.au> wrote:
> The problem is that if apply the style sheet to the document with the Schema
> information in it. It does not perform the transformation. But once I remove
> the schema information it works fine.
That's most likely a namespace problem, not directly related
to the fact that you have a schema associated:
> <bpxml version="1.0" xmlns="http://www.todaysystems.com.au"
^^^^^^
This puts all unqualified elements in a namespace. If
you have something like
<xsl:template match="bpxml">
in you style sheet, it won't match anything, even if you
have copied the namespace declaration into your stylesheet.
In order to match or select elements from your document, you
have to prefix them in the style sheet:
<xsl:stylesheet version="1.0" xmlns:xsl="..."
xmlns:d="http://www.todaysystems.com.au" ...>
...
<xsl:template match="d:bpxml">
...
... select="/d:bpxml[...]"...
HTH
J.Pietschmann
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list