--On Tuesday, 9 January 2001 6:13 PM Petr Cimprich wrote:

> My guess is that there is a mismatched tag inside the
> document('file:/some/dir/global.xml')/global/logo tree fragment (how
> about line 100?). Try to check the well-formness of global.xml.
>
> If this is not this case, try to send a minimal example generating the
> problem. This construction should work.
>
> Regards,
> Petr
>
>
> Stephen Welker wrote:
>
>> Having a problem with external XML references.
>>
>> For example, if the following template is in an XSL file...
>>
>> <xsl:template name="mainlogo">
>> <xsl:for-each select="document('file:/some/dir/global.xml')/global/logo">
>>  <!-- form IMG html directive -->
>> </xsl:for-each>
>> </xsl:template>
>>
>> If this is passed through sabcmd (Sablot-0.50/expat-1.95.1) I get the
>> following message...
>>
>> Error [code:2] [URI:file:/some/dir/global.xml] [line:100]
>> [node:element '<xsl:for-each>']
>>  XML parser error 7: mismatched tag
>> *** Error code 1
>>
>> The node "/global/logo" does exist in the global.xml file, the file is
>> in the same directory that the command was run.
>>
>> This XSL snippet is based apon the leftbar.xsl, top.xsl & head.xsl
>> examples from the Ginger Alliance web site.

Thanks for your reply.

The global.xml file did not have balanced tags - closing tag was missing 
the "/" character - I'm sure I checked this a dozen times ;-)

Is there a simple way of checking the well-formness of an XML file?

The only way I can think of is "sabcmd test.xsl file-to-test.xml" where 
test.xsl has the minimum amount of XSL directives and file-to-test.xml is 
the file to test.

Any ideas?

--
Stephen.

Reply via email to