Open URL - Set File Name
Oxygen general issues.
-
- Posts: 7
- Joined: Thu Mar 06, 2014 9:14 pm
Open URL - Set File Name
Hi everyone,
I have a PHP script that generates a DITA file from an HTML page using the PHP transformToXml() method. Then when I want to open the resulting DITA file via its URL, oXygen will set the file name to the PHP script automatically.
Here is the URL I am using (changed for privacy): http://www.mysite.com/php/my_script.php?url=my_url
The loaded file name will automatically be my_script.php, eventhough it's an XML file (I have set its mime-type to application/xml).
I was wondering if there was any way of changing that.
Best regards,
Jonathan
I have a PHP script that generates a DITA file from an HTML page using the PHP transformToXml() method. Then when I want to open the resulting DITA file via its URL, oXygen will set the file name to the PHP script automatically.
Here is the URL I am using (changed for privacy): http://www.mysite.com/php/my_script.php?url=my_url
The loaded file name will automatically be my_script.php, eventhough it's an XML file (I have set its mime-type to application/xml).
I was wondering if there was any way of changing that.
Best regards,
Jonathan
-
- Posts: 2879
- Joined: Tue May 17, 2005 4:01 pm
Re: Open URL - Set File Name
Hi Jonathan,
By default Oxygen ignores the mime-type, but there's an option you can enable in:
Options > Preferences, Connection settings > HTTP(S)/WebDAV
If you enable Use the 'Content-Type' header field to determine the content type, it will recognize the mime-type and open it as expected (as an XML file).
Note that the name will still be that of the script, but the content will be handled correctly.
Regards,
Adrian
By default Oxygen ignores the mime-type, but there's an option you can enable in:
Options > Preferences, Connection settings > HTTP(S)/WebDAV
If you enable Use the 'Content-Type' header field to determine the content type, it will recognize the mime-type and open it as expected (as an XML file).
Note that the name will still be that of the script, but the content will be handled correctly.
Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
-
- Posts: 7
- Joined: Thu Mar 06, 2014 9:14 pm
Re: Open URL - Set File Name
Thanks Adrian.
I wasn't clear enough, the content is handled correctly (eventhough I hadn't enabled the option you mentioned), but it's really just the file name I wanted to change (like, even call it "untitled" or any default name).
I wasn't clear enough, the content is handled correctly (eventhough I hadn't enabled the option you mentioned), but it's really just the file name I wanted to change (like, even call it "untitled" or any default name).
-
- Posts: 2879
- Joined: Tue May 17, 2005 4:01 pm
Re: Open URL - Set File Name
Hi,
Unfortunately there is no 'by design' way to do this from the Oxygen side. You could probably do something on the server side or maybe within the script.
However, you could trick Oxygen to believe it's a folder URL if you end the URL with '/' and then it will provide an 'untitled' name.
e.g. add at the end of the URL a dummy parameter that has the value '/'
Regards,
Adrian
Unfortunately there is no 'by design' way to do this from the Oxygen side. You could probably do something on the server side or maybe within the script.
However, you could trick Oxygen to believe it's a folder URL if you end the URL with '/' and then it will provide an 'untitled' name.
e.g. add at the end of the URL a dummy parameter that has the value '/'
Code: Select all
http://www.mysite.com/php/my_script.php?url=my_url&dummy=/
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service