Page 1 of 2 12 LastLast
Results 1 to 10 of 18
  1. #1
    Join Date
    Apr 2008
    Posts
    2,158

    Default Comparing HTML with all elements unimportant

    Is this possible? I've looked under Importance but find no rule that covers the HTML tags. "Keyword" covers just the tag names i.e. not attributes.

    Thanks.

  2. #2
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    11,787

    Default

    We have an HTML rule that displays just the text of the HTML file, HTML to Text:
    http://www.scootersoftware.com/downl...oreformats_alt
    This would remove the tags from view entirely.

    If you need them present, but unimportant, you may need to define new Grammar items that encapsulate the text you wish to define as unimportant. This could be a delimited grammar from "<" to ">", or something more complex.
    http://www.scootersoftware.com/suppo..._unimportantv3

    Let us know if you have any questions. Please include any sample files and your current settings. You can email us at support@scootersoftware.com, and please include the link back to this forum post.
    Aaron P Scooter Software

  3. #3
    Join Date
    Apr 2008
    Posts
    2,158

    Default

    > If you need them present, but unimportant

    I do.

    > you may need to define new Grammar items that encapsulate the text
    > you wish to define as unimportant. This could be a delimited grammar from
    > "<" to ">", or something more complex.
    > http://www.scootersoftware.com/suppo..._unimportantv3

    Thanks. I've followed that but it doesn't work, even if I uncheckmark the importance of all the preexisting elements:


    Any ideas?

  4. #4
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    11,787

    Default

    The Keyword definition is probably swallowing the Tag definition. You may need to delete your definition for Keywords. I would suggest making a copy of your current HTML rule and make edits there. Then place the default file format lower in the list. This way, you can revert to default behavior if needed.
    Aaron P Scooter Software

  5. #5
    Join Date
    Apr 2008
    Posts
    2,158

    Default

    Quote Originally Posted by Aaron View Post
    The Keyword definition is probably swallowing the Tag definition. You may need to delete your definition for Keywords.
    Thanks - deleting the first Keyword definition solved it, though of course leaving me unable to use the Keyword definition in this file format.

    Can you please explain this swallowing problem? Since I tried my Tag element both above and below the Keyword element, I am surprised that interference occurred.

  6. #6
    Join Date
    Oct 2007
    Location
    Pennsylvania
    Posts
    1,772

    Default

    Quote Originally Posted by chrisjj View Post
    I've followed that but it doesn't work, even if I uncheckmark the importance of all the preexisting elements
    In my experience, unchecking the importance of all preexisting elements is not enough. Move your Tag grammar definition to the top of the list so that it is evaluated before the Keyword grammar definition.

    Edit: I see that a new post appeared while I was posting this one. If you already tried putting the Tag grammar definition first then I, too, am surprised that "interference occurred". There must be some "undocumented" override for some of the built-in grammar types (i.e. Comments processed before keywords, keywords processed before other grammar types, etc.)
    Last edited by Michael Bulgrien; 12-Apr-2011 at 05:05 PM.
    BC v4.0.7 build 19761
    ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯

  7. #7
    Join Date
    Apr 2008
    Posts
    2,158

    Default

    > If you already tried putting the Tag grammar definition first

    Here it is:



    > then I, too, am surprised that "interference occurred". There must be some
    > "undocumented" override for some of the built-in grammar types

    I wait to hear. Thanks.

  8. #8
    Join Date
    Oct 2007
    Posts
    437

    Default

    Quote Originally Posted by chrisjj View Post
    Thanks - deleting the first Keyword definition solved it, though of course leaving me unable to use the Keyword definition in this file format.
    Each character in the file can only be classified as a single element type. Therefore, if you define "Tag" to match all characters between "<" and ">", the "Keyword" definition that matches parts of tags is completely useless.
    Erik Scooter Software

  9. #9
    Join Date
    Apr 2008
    Posts
    2,158

    Default

    Quote Originally Posted by Erik View Post
    ...if you define "Tag" to match all characters between "<" and ">", the "Keyword" definition that matches parts of tags is completely useless.
    It remains useful for enabling when required in the Important list. What mystifies me is even when disabled, it somehow overrides the Tag element - including when the tag element has priority in the list.

  10. #10
    Join Date
    Oct 2007
    Posts
    437

    Default

    You can't "disable" a grammar item. The only way to prevent it from classifying text is to delete it. You can change whether or not it is important. You cannot meaningfully use the built-in keyword definition and your new tag definition at the same time.
    Erik Scooter Software

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •