Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

Unsupported XML grammar with home.xsl


This topic is 6292 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted (edited)

Just getting started with XML in combination with FM. I used filemaker site assistant te generated some xsl files (eg. home.xsl).

When addressing this file with my browser (eg. http://192.168.123.101/fmi/xsl/my_templates/home.xsl) it generated an errorcode, which refers to "unsupported XML grammar" and outputs following in my IE browser:

<?xml version="1.0" encoding="UTF-8" standalone="no" ?>

View Source for full doctype...)>

-

When checking home.xsl with XMLspy, there is following message: "Unable to locate a reference to a supported schema type (DTD, W3C Schema) within this document instance."

How do i get some usefull html output?

Thx, Jakobsz.

Edited by Guest
Posted

Although trying very hard, i don’t seem to get a grasp on the real problem. I must be doing something structurally wrong. I need some help here….. I think the fmresultset.dtd is in some way linked to the problem. When retrieving it with a http request I get the following response:


The XML page cannot be displayed 

Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later. 

--------------------------------------------------------------------------------

Cannot have a DTD declaration outside of a DTD. Error processing resource 'http://192.191.190.10/fmi/xml/fmresultset.dtd'. ...



----------^





So i generated some xml through fmresultset.xml (……/fmi/xml/fmresultset.xml?-dbnames).

The result:



<?xml version="1.0" encoding="UTF-8" standalone="no"?>





	

	

	

	

		

	

	

		

			

				Event Management

			

		

		

			

				FMServer_Sample

			

		

		

			

				StorageAdvisor

			

		

	







When loading and validating it in XMLSpy following error message appears:


File C:Documents and SettingsmpetersDesktopfmresultset.xml could not be validated because of an error in XML Schema/DTD (see below)

	Unable to load external DTD subset via '-//FMI//DTD fmresultset//EN'. '/fmi/xml/fmresultset.dtd contains an invalid path.'

		Error location: fmresultset / PUBLIC

		Details

			WFC: External Subset: Unable to load external DTD subset via '-//FMI//DTD fmresultset//EN'. '/fmi/xml/fmresultset.dtd contains an invalid path.'

Is it the DOCTYPE declaration? or am i missing some file or......

J

Posted

Solved the problem of the dtd error by adding a "/" at the end.

Example:


http://[:port]/fmi/xml/fmresultset.dtd/

With an other browser on an other PC it seems to be working fine without the forwardslash. Beats me.

Did not make any progress on grammar fault yet.

J

Posted

According to Elizabeth Castro: "When an XML parser sees a public identifier, it can try to get a copy of the DTD from the best possible source, perhaps one that's closer or has the latest version of the DTD. If it can't find the DTD by using the public identifier, it can then resort to using the URL"

The standard DOCTYPE that's seems to be always part of the xml grammar looks like:




When edited and changed in:



There are now no grammar errors!

So how can i make this work for me?

J

Posted

TIP: I've run into this error with clients.

"The XML page cannot be displayed

Cannot view XML input using style sheet....", when the *desired* result was raw XML (transformed, of course!)

Not all browsers display this in the browser window. Sometimes you have to view the source to see the raw XML. Generally, another program will read the raw XML just fine. If you need it "human readable", consider using HTML or Text output, not XML

  • 3 weeks later...
Posted

Problem is solved.

My lack of basic FM-CWP and XML knowlegde was the problem. Hours of reading about these topics did some good for me.

Eventually is was the ../xml/.. versus the ../xsl/.. part in the URL Address ;)

One step back, two steps forward.

  • 3 weeks later...
  • 8 months later...
  • Newbies
Posted

I think I got a similar problem... I get an " Unable to load external DTD, schema, or entitiy source '(URL goes here.)' " error message when I try to validate a document, which works perfectly fine on a co-workers machine.

Ive tried adding the "/" at the end, like one of you guys posted, but then I cant save the document cuz it says " HTTP operation "GET" could not be performed on URL '(URL goes here)' due to an error: A connection with the server could not be established "

This topic is 6292 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.