qt4cg / qtspecs

QT4 specifications
https://qt4cg.org/
Other
28 stars 15 forks source link

Can't view the XSD for XSLT in the browser #374

Open ndw opened 1 year ago

ndw commented 1 year ago

If you attempt to open https://qt4cg.org/specifications/xslt-40/schema-for-xslt40.xsd in the browser (in Firefox), you'll get:

Error loading stylesheet: An unknown error has occurred (805303f4)
http://www.w3.org/2008/09/xsd.xsl

In a Chrome-derived browser I get a blank screen on which even the context menu doesn't work. Digging about in the inspect window leads me to

Unsafe attempt to load URL http://www.w3.org/2008/09/xsd.xsl from frame with URL
https://qt4cg.org/specifications/xslt-40/schema-for-xslt40.xsd. Domains, protocols and ports must match.

I conclude that the problem is trying to load the XSL for XSD from a different domain. Boo. I guess we should copy those stylesheets to qt4cg.org, or remove the stylesheet PI, or ignore the whole thing on the assumption that we'll eventually publish these specifications in some W3C location and the probem will go away. Maybe.

michaelhkay commented 1 year ago

Alternatively, enable CORS?

https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS

Michael Kay Saxonica

On 27 Feb 2023, at 10:11, Norman Walsh @.***> wrote:

If you attempt to open https://qt4cg.org/specifications/xslt-40/schema-for-xslt40.xsd in the browser (in Firefox), you'll get:

Error loading stylesheet: An unknown error has occurred (805303f4) http://www.w3.org/2008/09/xsd.xsl In a Chrome-derived browser I get a blank screen on which even the context menu doesn't work. Digging about in the inspect window leads me to

Unsafe attempt to load URL http://www.w3.org/2008/09/xsd.xsl from frame with URL https://qt4cg.org/specifications/xslt-40/schema-for-xslt40.xsd. Domains, protocols and ports must match. I conclude that the problem is trying to load the XSL for XSD from a different domain. Boo. I guess we should copy those stylesheets to qt4cg.org, or remove the stylesheet PI, or ignore the whole thing on the assumption that we'll eventually publish these specifications in some W3C location and the probem will go away. Maybe.

— Reply to this email directly, view it on GitHub https://github.com/qt4cg/qtspecs/issues/374, or unsubscribe https://github.com/notifications/unsubscribe-auth/AASIQIT33OJULZVTREUIT63WZR4V7ANCNFSM6AAAAAAVJGEYAM. You are receiving this because you are subscribed to this thread.

ndw commented 1 year ago

Ahh. Perhaps. I'd got it the wrong way around in my head. I thought of CORS, and then I thought I'd have to get the W3C site to change something for that to work. But that's backwards. Thank you.

ndw commented 1 year ago

Hmmm... qt4cg.org serves:

access-control-allow-origin: *

so maybe my intuition was right about having to change something on the W3C side?

I really should get my head around how CORS actually works, I guess.

ndw commented 4 months ago

Note that the XSD stylesheet reference is currently commented out so it "works" for some definitions of "work".