How to set language to self defined element?

Hi, I try to add an xml:lang attribute to an element in my schema. There is some (very short) explanation how this should be done in xml.xsd, but that doesn't work out for me. I have some elements that extend the ph-element. Can you please explain to me how to set the xml:lang attribute so spell check can be done on these elements? Eg. <example xml:lang="nl">Dit is een voorbeeld</example> <word xml:lang="frisian">Dit is een woord</word> Kind regards, Roderik Dernison ________________________________ ---------------------------------------------------------- Aan dit bericht kunnen geen rechten worden ontleend. Het bericht is alleen bestemd voor de geadresseerde. Indien het bericht niet voor u is bestemd, verzoeken wij u dit aan ons te melden en het bericht te verwijderen. This message shall not constitute any obligations. This message is intended solely for the addressee. If you have received this message in error, please inform us and delete the message. ----------------------------------------------------------

On Tuesday, March 27, 2012, 3:32:05 PM, Roderik wrote: RD> Eg. <example xml:lang=”nl”>Dit is een voorbeeld</example> RD> RD> <word xml:lang=”frisian”>Dit is een woord</word> The second example is not valid according to BCP-47 http://tools.ietf.org/html/bcp47 Language codes of five to 8 characters must be registered. the registry is here http://www.iana.org/assignments/language-subtag-registry Note that ISO 639-3 provides three codes for Frisian: frr|||Northern Frisian|frison septentrional frs|||Eastern Frisian|frison oriental fry||fy|Western Frisian|frison occidental http://www.loc.gov/standards/iso639-2/ISO-639-2_utf-8.txt ISO 639-1 notes that the unregistered term "Frisian" is deprecated in favour of "fy" http://id.loc.gov/vocabulary/iso639-1/fy.html -- Chris Lilley Technical Director, Interaction Domain W3C Graphics Activity Lead, Fonts Activity Lead Co-Chair, W3C Hypertext CG Member, CSS, WebFonts, SVG Working Groups

Hi Roderick, Basically to allow "xml:lang" as an accepted attribute in your custom XML Schema you would first have to import:
<xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="xml.xsd"/>
then in the place where you define your complex type, you would make a reference like:
<xs:attribute ref="xml:lang"/>
Regards, Radu Radu Coravu <oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger http://www.oxygenxml.com On 3/27/2012 4:32 PM, Roderik Dernison wrote:
Hi,
I try to add an xml:lang attribute to an element in my schema. There is some (very short) explanation how this should be done in xml.xsd, but that doesn’t work out for me.
I have some elements that extend the ph-element. Can you please explain to me how to set the xml:lang attribute so spell check can be done on these elements?
Eg. <example xml:lang=”nl”>Dit is een voorbeeld</example>
<word xml:lang=”frisian”>Dit is een woord</word>
Kind regards,
Roderik Dernison
------------------------------------------------------------------------
---------------------------------------------------------- Aan dit bericht kunnen geen rechten worden ontleend. Het bericht is alleen bestemd voor de geadresseerde. Indien het bericht niet voor u is bestemd, verzoeken wij u dit aan ons te melden en het bericht te verwijderen.
This message shall not constitute any obligations. This message is intended solely for the addressee. If you have received this message in error, please inform us and delete the message. ----------------------------------------------------------
_______________________________________________ oXygen-user mailing list oXygen-user@oxygenxml.com http://www.oxygenxml.com/mailman/listinfo/oxygen-user
participants (3)
-
Chris Lilley
-
Oxygen XML Editor Support
-
Roderik Dernison