-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Help with Sublime Text and free-form markup exercise #4
Comments
Hello! I have a question with regards to the exercise. When I tried to copy and paste the text into Sublime, I added a header and when I opened the file in the browser it was showing only the header, but not the rest of the text or the root- what can I do to make the text and the root appear in browser view too? Thank you in advance! |
Hi there. I wonder if you're mixing up HTML and XML element and that is confusing the browser. You could try - if you haven't already done this - putting an html element around everything. Normally with errors like this is a good approach to get the minimum working and then keep adding until you hit the problem. So in your case you've got the header working and I would add a very small amount of text underneath, eg a paragraph, and see if that will display. Feel free to paste your markup here if it's still not displaying. |
Thank you for your message. When I save it as an xml file it does not display the text or the root element, it only shows 'Gallia'. Is there a Sublime viewer that would allow me to see the final result? I have tried saving it as .html and opening it with a browser, but it still does not display the root. |
I don't there is an easy way to view XML in a browser: because you can invent your own elements there is no automatic way for the browser to render any given element. The standard way to do it is to write a stylesheet in a language called XSLT, where you would specify a mapping from XML to HTML, but XSLT takes a bit of time to learn. For these exercises I would do them either in XML or HTML (or both) but only render the result in a browser if you're doing HTML. With XML it's quite normal just to use it in a text editor like Sublime. Sublime has an XML add-on that display XML a bit more nicely than the default, I think, but it will still look pretty plain. Don't worry about that: it's how people generally work with XML. |
Thank you very much for your helpful clarifications - I will try again with Sublime! |
Good luck! Let me know if you have any questions as you go along. Happy to try to help. |
If you have any technical problems or other difficulties with the exercise for Session 2, please feel free to ask it in this thread, and we or your colleagues will try to address it.
The text was updated successfully, but these errors were encountered: