> Well, not being a Windows guru, I cannot suggest something smarter than: > > --- > start "" "%U" > ---
For the benefit of others, I had arrived at the following horribly contorted sequence which does cope with a fragment identifier but seems way over the top (I'm not a windows guru either). It runs "assoc" to get the file type associated with ".html" then runs "ftype" to find the command to run. Finally it substitutes the URL into that command! --- Assume xmlns:gv="http://www.xmlmind.com/xmleditor/namespace/scope/view" <command name="winXP.openHTML"> <macro> <sequence> <choice> <!-- dont recalculate command if its already known --> <test expression="string-length($gv:winopen.html) > 0"/> <sequence> <command name="run" parameter="assoc .html"/> <get expression="substring-before('%_',' ')"/> <!-- remove newline --> <get expression="substring-after('%_', '.html=')"/> <set variable="Ftype" expression="'%_'"/> <get expression="$Ftype"/> <command name="run" parameter="ftype %_"/> <get expression="substring-before('%_',' ')"/> <!-- remove newline --> <get expression="substring-after('%_', concat($Ftype, '='))"/> <set variable="gv:winopen.html" expression="'%_'"/> </sequence> </choice> <!-- substitute our URL for "%0" or %1" (Windows could use either) --> <get expression="replace($gv:winopen.html, '%%[01]', '%0')"/> <command name="start" parameter="start %_"/> </sequence> </macro> </command> -- Philip Hussein Shafie wrote: > Philip Nye wrote: > >>Unfortunately the Windows version does not seem to work for a URL with a >>fragment identifier. My browser (Firefox) opens the document but misses >>the fragment identifier. > > > Well, not being a Windows guru, I cannot suggest something smarter than: > > --- > start "" "%U" > --- > > >>Hussein Shafie wrote: >> >>>Philip Nye wrote: >>> >>> >>>>Can anyone suggest how I can open a default browser window to show a URL >>>>from within an XXE macro? I need to have this work on Linux and Windows >>>>so I may need two different methods. Is there a fairly simple way to do >>>>this? >>> >>> >>>No, there is no *simple* way to do this. But there should be one. >>>Therefore I've added a "viewHTML" command to XXE. You'll have it in next >>>release. >>> >>>Meanwhile, using XXE V2.11, you need to use command "start" (see >>>http://www.xmlmind.com/xmleditor/_distrib/doc/commands/ch06s68.html) >>>with the following parameter: >>> >>>On Windows: >>> >>>start "" "%U" >>> >>>On MacOSX: >>> >>>open "%U" >>> >>>On Generic Unix: >>> >>>(mozilla -remote "openURL(%U)" 1> /dev/null 2>&1) || (mozilla "%U" &) >>> >>>Where %U=URL of the document to be displayed by the browser. >>> >>>On MacOSX and Generic Unix, ending the parameter with '&' is not needed >>> >>>Note that the double quotes (") are integral part of the command >>>parameter. > > > -- > XMLmind XML Editor Support List > xmleditor-support at xmlmind.com > http://www.xmlmind.com/mailman/listinfo/xmleditor-support >

