<textdump> whitespace

Bryan Dumm bdumm at bobby.bcpub.com
Thu Jan 11 04:19:39 PST 2001


On Wednesday 10 January 2001 13:05, you wrote:
> This problem can be solved, if you don't mind doing :
>
> 	<textdump dir="directory" file="filename">
> 		=if [ -f /forcefsck ]
> 		=then
> 		=	echo -n "/forcefsck exists, forcing "
> 		=	echo "file system check"
> 		=	force="-f"
> 		=else
> 		=	force=""
> 		=fi
> 	</textdump>
>
> which would be the same as:
>
> 	<textdump dir="directory" file="filename">
> 	=if [ -f /forcefsck ]
> 	=then
> 		=	echo -n "/forcefsck exists, forcing "
> 		=	echo "file system check"
> 		=	force="-f"
> 	=else
> 		=	force=""
> 	=fi
> 	</textdump>
>
> etc.
>
> Is this acceptable?

sounds fine to me, maybe this will wind up a FAQ question???

Why does my <textdump> elements always mess up with whitespace?

Because in XML whitespace counts. Use a = sign in front like

> 	<textdump dir="directory" file="filename">
> 	=if [ -f /forcefsck ]
> 	=then
> 		=	echo -n "/forcefsck exists, forcing "
> 		=	echo "file system check"
> 		=	force="-f"
> 	=else
> 		=	force=""
> 	=fi
> 	</textdump>

to avoid this... :)

Bryan






More information about the alfs-discuss mailing list