This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Transforming an XML document linked to a XML schema


"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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]