Text formatting

64 views
Skip to first unread message

Jacopo Moronato

unread,
Oct 30, 2014, 11:57:48 AM10/30/14
to europass...@googlegroups.com
Hi,
could be possible / is it in your plan to implement some simple text formatting (like bold, italicum, underlined) for the content added by the user?

Europass Interoperability

unread,
Oct 31, 2014, 4:52:35 AM10/31/14
to europass...@googlegroups.com
Dear Jacopo,

Thanks for your message.

It is already possible to apply formatting such as the one you mention, in rich text fields (e.g. work experience activities, education subjects/occupational skills, etc.).

If your source document is in JSON format, you can use the following tags (see also the attached formatted.json file):
  • Bold: <b>, e.g. <b>Bold</b>.
  • Italics: <i>, e.g. <i>Italics</i>.
  • Underline: <u>, e.g. <u>Underlined</u>
If it's in XML format, just make sure to escape the above tags as shown below (see also the attached formatted.xml file):
  • &lt;b&gt;Bold&lt;/b&gt;
  • &lt;i&gt;Italics&lt;/i&gt;
  • &lt;u&gt;Underlined&lt;/u&gt;
The attached formatted.pdf file is the result that you will get if you convert formatted.xml or formatted.json to PDF, via the Europass REST API

You can also experiment with the Europass online editor for further formatting options and see how they look like in the generated XML.

Does this help?

Best regards,

Dimitris Zavaliadis
Team Europass 
formatted.xml
formatted.json
formatted.pdf

Jacopo Moronato

unread,
Oct 31, 2014, 10:24:14 AM10/31/14
to europass...@googlegroups.com
It helps!
Thank you, I wasn't aware it was already implemented.

Greetings,

Jacopo Moronato

--
You received this message because you are subscribed to a topic in the Google Groups "Europass Interoperability" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/europass-interop/i8KdahGcICo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to europass-inter...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Celso Santos

unread,
May 12, 2015, 7:03:50 AM5/12/15
to europass...@googlegroups.com
Hi,

I actually have the same question regarding text formating, but in my case, I'd like to ask if it's possible to, when building the XML file, inser new lines. I've tried using "&#xD;&#xA;", i've tried (in C#) appending Environment.NewLine, I've tried using "&#10" and I've event tried "\n" but none of them seem to work since on the output file I still get everything in a single line.

As a note, I'm trying to use this on the Employer field. Maybe that's the issue?

I'd like to have the Position ("Director(a) de Divisão"), the Employer ("MEEC") and then, on a new line have the remaining information ("obra - ....").

How can I achieve this? I'm leaving an image with the current status, so that you can better understand what's going on at the moment.

Europass Interoperability

unread,
May 12, 2015, 11:05:28 AM5/12/15
to europass...@googlegroups.com, celso....@syone.com
Dear Celso,

Thank you for your message.

As you correctly pointed out, custom formatting is not possible in the Employer field (or any other plain text field for that matter), only in rich text fields such as <Activities> under <WorkExperience> and <Education>.

But maybe the "obra - Assistencia de obras em fase garantia Ex soprocil" part should actually go to the Activities field? I don't speak Portuguese, but it sounds something like a work description to me (Google Translate is not very helpful, it gives me this => "work - Assistance works on stage Ex guarantee soprocil"). 

If that's case, your XML should perhaps look like this:

<WorkExperience>
 
<Position><Label>Director(a) de Divisão</Label></Position>
 
<Activities>obra - Assistencia de obras em fase garantia Ex soprocil</Activities>
 
<Employer>
   
<Name>MEEC</Name>
     
<ContactInfo>
       
<Address>
         
<Contact>
           
<PostalCode>10193</PostalCode>
           
<Country><Code>PT</Code><Label>Portugal</Label></Country>
         
</Contact>
       
</Address>
     
</ContactInfo>
   
<Sector><Label>Produção Construção Civil</Label></Sector>
 
</Employer>
</WorkExperience>

Please also check the attached xml and pdf files and let me know what you think (we can find a workaround for "10193" and "Portugal" if you need them on the same line with "MEEC").

Best regards,

Dimitris Zavaliadis
Team Europass
test.xml
test.pdf

Celso Santos

unread,
May 12, 2015, 11:52:05 AM5/12/15
to europass...@googlegroups.com, celso....@syone.com
Thank you. I figured that the problem was that probably the Employer Field wasn't rich text (reading the previous answers).
Maybe that's something you should consider mentioning on the documentation (which fields are rich text)?

One question still persists is, what is the correct way to insert that new line? The XML definition for new line, html definition, C# definition..?

Best Regards.

Celso Santos

unread,
May 12, 2015, 12:00:55 PM5/12/15
to europass...@googlegroups.com
Ok, forget that last question, I figured it out.

For future reference, it's the XML new line: "&#xD;&#xA;"

Best Regards

Europass Interoperability

unread,
May 13, 2015, 5:35:01 AM5/13/15
to europass...@googlegroups.com, celso....@syone.com
Hi Celso,

Indeed, the documentation definitely needs improvements. In the meantime, here's a list of all rich text fields in the CV (using XPath-style notation):
  • /SkillsPassport/LearnerInfo/Headline/Description/Label
  • /SkillsPassport/LearnerInfo/WorkExperienceList/WorkExperience/Activities
  • /SkillsPassport/LearnerInfo/EducationList/Education/Activities
  • /SkillsPassport/LearnerInfo/Skills/Communication/Description
  • /SkillsPassport/LearnerInfo/Skills/Organisational/Description
  • /SkillsPassport/LearnerInfo/Skills/JobRelated/Description
  • /SkillsPassport/LearnerInfo/Skills/Computer/Description
  • /SkillsPassport/LearnerInfo/Skills/Other
  • /SkillsPassport/LearnerInfo/AchievementList/Achievement/Description
Check also the attached rich-text-fields.xml and rich-text-fields.pdf. I've entered the text "rich text here" in all rich text fields so that you can easily CTRL+F them.

Concerning new lines, yes &#xD;&#xA; also works, but better use one of these:
  • Enclose in escaped <p> tags each sentence that needs to be on a separate line. For example:
    &lt;p&gt;first line&lt;/p&gt;&lt;p&gt;second line&lt;/p&gt;
  • Insert an escaped <br/> tag before the sentence that needs to go on a separate line, e.g.:
    first line&lt;br/&gt;second line
See the work experience and education fields in the attached new-lines.xml and new-lines.pdf for an example of the above.

Hint: you can reverse engineer a lot of the above by using the Europass online editor and generating an XML from there.

Hope this helps. Please let us know if you need anything else.

Best regards,

Dimitris Zavaliadis
Team Europass
rich-text-fields.xml
rich-text-fields.pdf

Europass Interoperability

unread,
May 13, 2015, 5:36:45 AM5/13/15
to europass...@googlegroups.com, europa...@gmail.com, celso....@syone.com
Oops, forgot to attach new-lines.xml and new-lines.pdf to the previous post, here they are.
new-lines.xml
new-lines.pdf
Reply all
Reply to author
Forward
0 new messages