Hi,

As Jukka said the path can be relative to the Mapfile. Note if you have nested 
includes (an INCLUDE within another INCLUDE) the paths should be relative to 
the top-level Mapfile, not its parent. 

The error "Please correct the issue in the text tab" isn't coming from 
MapServer - so maybe this is related to MapManager?

You also have listed both Windows and Linux - could it be related to 
case-sensitive file names, or Window line-endings?

Seth

--
web:https://geographika.net & https://mapserverstudio.net
mastodon: @geographika@mastodon.social

On Wed, Jun 4, 2025, at 8:46 AM, Philippe Ghesquiere via MapServer-users wrote:
> Dear all,
> 
> Environment :
> Windows : mapmanager, based on MapServer 8.0.1, GDAL 3.8.4
> Linux : MapServer 8.2.0, GDAL 3.8.4
> 
> In order to make my map files more generic, I am using INCLUDE directives.
> When defining a LABEL, I tried to INCLUDE some common definitions. For 
> example :
> 
> MyClass.map file :
> CLASS
>    STYLE
>       ....
>    END
>    LABEL
>       EXPRESSION ('[NAME]' != 'UNK')
>       TEXT       "[NAME]"
>       INCLUDE    "TextCharacteristics.txt"
>    END
> END
> 
> TextCharacteristics.txt file :
> POSITION CC
> COLOR    "#000000"
> FONT     condensed
> SIZE     12
> 
> I get the following error :
> 'load_Label(): Premature End-of-File. ;msyylex(): Unable to access file.
> Error opening included file "TextCharacteristics.txt"..
> Please correct the issue in the text tab'
> 
> As a workaround, I gave the absolute file path to make it work.
> 
> The documentation says that relative path could be used.
> 
> Did I make something wrong ?
> 
> Thanks for your help
> 
> Philippe
> The information in this e-mail is confidential. The contents may not be 
> disclosed or used by anyone other than the addressee. Access to this e-mail 
> by anyone else is unauthorised.
> If you are not the intended recipient, please notify Airbus immediately and 
> delete this e-mail.
> Airbus cannot accept any responsibility for the accuracy or completeness of 
> this e-mail as it has been sent over public networks. If you have any 
> concerns over the content of this message or its Accuracy or Integrity, 
> please contact Airbus immediately.
> All outgoing e-mails from Airbus are checked using regularly updated virus 
> scanning software but you should take whatever measures you deem to be 
> appropriate to ensure that this message and any attachments are virus free.
> _______________________________________________
> MapServer-users mailing list
> MapServer-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
> 
_______________________________________________
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

Reply via email to