Putting the xml into a website
Questions about XML that are not covered by the other forums should go here.
-
- Posts: 10
- Joined: Mon May 29, 2017 7:19 pm
Putting the xml into a website
I have a wordpress account and would like to link the xml I made there. I have a stylesheet so I know it can be read in a browser, but copying and pasting the link created with "Transformation Scenario" doesn't work. Am I missing something straightforward?
-
- Posts: 9414
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Putting the xml into a website
Hi,
Usually when you have an XML document and you want to publish it online, you do not just upload the XML document with a CSS stylesheet.
You first convert the XML document to HTML using XSLT and upload the HTML document (which can refer to a CSS or contain embedded CSS).
As an example in the Oxygen samples project there is an XML document OXYGEN_INSTALL_DIR\samples\personal.xml and an XSLT stylesheet OXYGEN_INSTALL_DIR\samples\personal.xsl which can be applied on the XML by creating a transformation scenario to produce HTML.
Regards,
Radu
Usually when you have an XML document and you want to publish it online, you do not just upload the XML document with a CSS stylesheet.
You first convert the XML document to HTML using XSLT and upload the HTML document (which can refer to a CSS or contain embedded CSS).
As an example in the Oxygen samples project there is an XML document OXYGEN_INSTALL_DIR\samples\personal.xml and an XSLT stylesheet OXYGEN_INSTALL_DIR\samples\personal.xsl which can be applied on the XML by creating a transformation scenario to produce HTML.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 10
- Joined: Mon May 29, 2017 7:19 pm
Re: Putting the xml into a website
Hi,
So I converted the xml to html using an xslt stylesheet, but the link in the browser still won't work when I try to make it a link on the website. What do you mean when you say "upload the html document"? Do you mean the xslt stylesheet? And I should upload this to Wordpress?
Alison
So I converted the xml to html using an xslt stylesheet, but the link in the browser still won't work when I try to make it a link on the website. What do you mean when you say "upload the html document"? Do you mean the xslt stylesheet? And I should upload this to Wordpress?
Alison
-
- Posts: 10
- Joined: Mon May 29, 2017 7:19 pm
Re: Putting the xml into a website
Can you clarify this? I have an xml document that has been converted to html with xslt. But this is still a file which I can't put onto a website, so there must be another step.
Thanks,
Alison
Thanks,
Alison
-
- Posts: 9414
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Putting the xml into a website
Hi Alison,
You should probably try to contact someone from Wordpress about your Wordpress related problems.
If after uploading an HTML document you have a broken link in it, it probably means that the file linked by the HTML document is not located anymore relative to the HTML document. So you probably also need to upload that file.
Regards,
Radu
You should probably try to contact someone from Wordpress about your Wordpress related problems.
If after uploading an HTML document you have a broken link in it, it probably means that the file linked by the HTML document is not located anymore relative to the HTML document. So you probably also need to upload that file.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 10
- Joined: Mon May 29, 2017 7:19 pm
Re: Putting the xml into a website
Well, I talked to the Wordpress people and they looked at the site and said it's definitely not their system, but the file itself. Which I agree with; I think I'm doing something wrong with the process of converting an xml document to html with xslt. So I have xml, xsl and css, and they're all separate files. Is there some way to combine them to make one html file? Or Do I just rename one of them .html?
-
- Posts: 2879
- Joined: Tue May 17, 2005 4:01 pm
Re: Putting the xml into a website
Hi,
The question is, what is the desired result? You want to upload the XML file as is (just keep it as XML and link to it), or the web page (HTML) representation/published format of that XML file (depends on how you transformed the XML with an XSLT)?
If you want to have it as HTML and it also links/refers to other resources (CSS, images) you'll need to upload the HTML and also those resources with it. The XSLT is not part of published resources, the XSLT is simply the catalyst for your transformations.
Before you involve Wordpress, you'll first want to check the generated HTML locally. Just open it in a web browser and check if it looks right. If it doesn't, your XSLT may need some additional work.
Regards,
Adrian
The question is, what is the desired result? You want to upload the XML file as is (just keep it as XML and link to it), or the web page (HTML) representation/published format of that XML file (depends on how you transformed the XML with an XSLT)?
If you want to have it as HTML and it also links/refers to other resources (CSS, images) you'll need to upload the HTML and also those resources with it. The XSLT is not part of published resources, the XSLT is simply the catalyst for your transformations.
Before you involve Wordpress, you'll first want to check the generated HTML locally. Just open it in a web browser and check if it looks right. If it doesn't, your XSLT may need some additional work.
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: 10
- Joined: Mon May 29, 2017 7:19 pm
Re: Putting the xml into a website
Hi,
The second one: I want to link to the HTML. I've checked it, by clicking on the Transformation Scenario, which then makes it appear in a tab of the browser. Is that what you meant? And it looks fine there. But now this tab is called
file:///C:/Users/aliso/Desktop/DH%20work/TEI/Marginalia%20in%20Mandeville's%20Travels%202.html
and apparently this doesn't when I try to make a link to it. So I guess I need to do something else?
The second one: I want to link to the HTML. I've checked it, by clicking on the Transformation Scenario, which then makes it appear in a tab of the browser. Is that what you meant? And it looks fine there. But now this tab is called
file:///C:/Users/aliso/Desktop/DH%20work/TEI/Marginalia%20in%20Mandeville's%20Travels%202.html
and apparently this doesn't when I try to make a link to it. So I guess I need to do something else?
-
- Posts: 2879
- Joined: Tue May 17, 2005 4:01 pm
Re: Putting the xml into a website
That's a local file (see the file:/// protocol), you can't link to a local file from a website since only you have the file locally.
You need to upload the html (and resources) to a web server and link to it (a/@href) from another web page. Not sure what restrictions/limitations Wordpress has in this regard. I am not familiar with their services.
Regards,
Adrian
You need to upload the html (and resources) to a web server and link to it (a/@href) from another web page. Not sure what restrictions/limitations Wordpress has in this regard. I am not familiar with their services.
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: 10
- Joined: Mon May 29, 2017 7:19 pm
Re: Putting the xml into a website
What do you mean when you say "upload the html and resources"? Are the resources the xslt and css files? I'm working on the Wordpress side of things, but they can't tell me anything about xml.
As far as I understand it, the xml file is meaningless without the xslt and the css to interpret it for a browser. So I have 3 separate files which need to work together. How do I combine them/upload them together?
Thanks.
As far as I understand it, the xml file is meaningless without the xslt and the css to interpret it for a browser. So I have 3 separate files which need to work together. How do I combine them/upload them together?
Thanks.
-
- Posts: 2879
- Joined: Tue May 17, 2005 4:01 pm
Re: Putting the xml into a website
HI,
The HTML is the result of the XML transformation with XSL (XML+XSL => HTML). HTML is the published result, so after obtaining the HTML, you no longer need the XML+XSL. Just upload the HTML.
XML+XSL are not meant for the web browser. There are ways to make them work in the browser, but that's not their purpose.
You should be able to upload each file separately (HTML+CSS+images).
Regards,
Adrian
"Resources" are CSS+images and any other things you link to from your published HTML. XSLT is not needed after you obtained the HTML. XSLT is just the catalyst for obtaining the HTML.What do you mean when you say "upload the html and resources"? Are the resources the xslt and css files?
The HTML is the result of the XML transformation with XSL (XML+XSL => HTML). HTML is the published result, so after obtaining the HTML, you no longer need the XML+XSL. Just upload the HTML.
XML+XSL are not meant for the web browser. There are ways to make them work in the browser, but that's not their purpose.
For a web site you need the HTML+CSS+images (if any). You need to upload them separately. While it is possible to create an HTML with embedded CSS and images, that's a bit overkill (images are base64 encoded and HTML becomes huge).As far as I understand it, the xml file is meaningless without the xslt and the css to interpret it for a browser. So I have 3 separate files which need to work together. How do I combine them/upload them together?
You should be able to upload each file separately (HTML+CSS+images).
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
Return to “General XML Questions”
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