As includes can only include csp pages it makes sense to restrict the extension to .csp. The file include is there to do textual includes before compile and it is expected those are external files hence the good programming recommendation. From our side - unofficially as we only provide mappings for recognizing .csp and .cls it makes sense that these are the only extensions recognized by the compiler. Although I agree changing it if it worked is not correct.

kevin furze wrote:
ok, so doing some more testing
I created a simple page

<html>
<head>
<title>Test Include</title>
</head>

<body>
<h1> this is the main body</h1>
<csp:include page='Include/InsideInclude.inc'>
<csp:include page='Include/InsideInclude.csp'>
</body>
</html>


and then inside the Include/InsideInclude.inc page a simple line <H1> now inside INC</h1> and inside the Include/InsideInclude.csp page a simple line <H1> now inside CSP</h1>


when you run the file, all you get is the contents of the CSP extension.
if you change the syntax to:
<!--#INCLUDE FILE="filename"-->
both extensions work,



inside the <!--#INCLUDE FILE="filename"--> documentation, it mentions "good programming practice to use the INC extension" but no mention inside the CSP:INCLUDE documentation,


seems like intersystems has changed the rules, introduced a bug and forgot to tell anyone. I've raised a bug alert within intersystems

thanks for the help


kev




Reply via email to