Menu

UDL based on XML with extra tags

John
2009-05-29
2012-11-13
  • John

    John - 2009-05-29

    For reasons I won't bore you with, I have a need to create a UDL based on XML, but that also allows/highlights some additional non-XML tags (rather like the formatting tags you get in some forums), e.g.:

         [b] .... [/b]
         [i] ... [/i]
         [p] ... [/p]
         [^]
         [~]

    Two questions:

    1) The N++ help suggests that basing a UDL on an existing language is simply a case of selecting the required language, bringing up the UDL dialogue, and selecting 'Save As'.  But is doesn't seem to work for me.

    2) I can get N++ to identify  [b] [i] [p] correctly via the UDL dialogue, but how to code for [/b] etc, or for [^] or [~]?  Or do I have to edit an XML file for the UDL?

    Any help gratefully received.

     
    • John

      John - 2009-06-03

      ... and where is the 'Operator panel section' ?

       
    • John

      John - 2009-06-01

      .  further to the above, I can get N++ to recognise (for example) '[b]' with a preceding space (e.g. 'blah blah [b] blah blah...') but NOT if it is contiguous with the adjacent text (e.g. blahblah[b]blahblah....').  XML tags don't have this problem, so what am I missing, or is there a bug/restriction in UDL vs. built-in languages?

       
    • cchris

      cchris - 2009-06-01

      There are many restrictions. Actually, the UDL system enables defining a single language with some parameters - what the keywords, operators and other stuff are. But hardly any of the byult-in languages could be done properly through the UDL panel.

      You may want to read about the main two rules for keyword recognition. They are buried in the Operator panel section.

      CChris