Skip to content
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

Closed
gabrielbodard opened this issue Oct 13, 2020 · 6 comments
Closed

Help with Sublime Text and free-form markup exercise #4

gabrielbodard opened this issue Oct 13, 2020 · 6 comments
Assignees
Labels
help wanted Extra attention is needed ICS02

Comments

@gabrielbodard
Copy link
Member

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.

@despinaborcea
Copy link

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!

@jonathanblaney
Copy link

jonathanblaney commented Oct 19, 2020

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.

@despinaborcea
Copy link

Thank you for your message.
This is the bit I was working on:

Gallia est omnis divisa in partes tres, quarum unam incolunt Belgae, aliam Aquitani, tertiam qui ipsorum lingua Celtae, nostra Galli appellantur.

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.

@jonathanblaney
Copy link

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.

@despinaborcea
Copy link

Thank you very much for your helpful clarifications - I will try again with Sublime!

@jonathanblaney
Copy link

Good luck! Let me know if you have any questions as you go along. Happy to try to help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed ICS02
Projects
None yet
Development

No branches or pull requests

4 participants