Re: [xsl] How to get XSL style sheet to ignore a setting in an XML file

Subject: Re: [xsl] How to get XSL style sheet to ignore a setting in an XML file
From: "Michael Kay mike@xxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 4 Nov 2014 21:22:19 -0000
Yes, a zillion people have encountered this problem before.

Namespace declarations are fundamental to the meaning of the XML, and you
can't just ignore them. It would be like ignoring the first three characters
of the element name. In your stylesheet code you need to embrace them, not
ignore them.

A useful technique in XSLT 2.0 is to put xpath-default-namespace on the
xsl:stylesheet element to match the default namespace of the source document.

Michael Kay
+44 (0) 118 946 5893

On 4 Nov 2014, at 20:22, Catherine Wilbur cwilbur@xxxxxxxxxxx
<xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:

> First line of my XML file has the following information in it.
> <payment_data xmlns="http://com/exlibris/repository/acq/invoice/xmlbeans";
> Style sheet will not process the xsl conversion logic until I remove the
following from the the above line in my XML file
>          xmlns="http://com/exlibris/repository/acq/invoice/xmlbeans";
> This is logic at very top of my style sheet
> <xsl:stylesheet version="2.0"
>         xmlns:xsl="";
>         xmlns:xs="";
>         xmlns:fn="";
>         xmlns:xdt="";
>         xmlns:err="";
>         exclude-result-prefixes="xs xdt err fn"
> >
>         <xsl:output method="text" indent="no"/>
> 1)  How do I ask the style sheet to ignore the "xmlns="?
> 2)  Is there a way to remove it if it is in there?
> 3)  Might be able to ask company to remove it?
> As soon as I copy the XML to new file name and remove that section of code
then the file gets converted by the style sheet.
> Has anyone encountered this problem before?
> _____________________________________________________________________
> Catherine Wilbur  |  Senior Application Programmer  |  IT Services
> 401 Sunset Avenue, Windsor ON Canada  N9B 3P4
> (T) 519.253.3000 Ext. 2745  |  (F) 519.973.7083  |  (E) cwilbur@xxxxxxxxxxx
> XSL-List info and archive
> EasyUnsubscribe (by email)

Current Thread