Professional Web Applications Themes

#40567 [NEW]: DOMDoent->createElement() - PHP Bugs

From: bpipe at mail dot ru Operating system: PHP version: 5.2.1 PHP Bug Type: Feature/Change Request Bug description: DOMDoent->createElement() Description: ------------ DomDoent->CreateElement() I have a feature request, i think you should add a waring or notice when someone is calling CreateElement with ':' in node name. Like this one: $xsl->createElement('xsl:import'); instead of CreateElementNS, because this problem is hard to detect (doent look like it should when you output it) I made this mistake myself and it took me 2 days to find out the problem, and only when i found the problem i managed to find any information about this ...

  1. #1

    Default #40567 [NEW]: DOMDoent->createElement()

    From: bpipe at mail dot ru
    Operating system:
    PHP version: 5.2.1
    PHP Bug Type: Feature/Change Request
    Bug description: DOMDoent->createElement()

    Description:
    ------------
    DomDoent->CreateElement()
    I have a feature request, i think you should add a waring or notice when
    someone is calling CreateElement with ':' in node name.

    Like this one:
    $xsl->createElement('xsl:import');
    instead of CreateElementNS, because this problem is hard to detect
    (doent look like it should when you output it)
    I made this mistake myself and it took me 2 days to find out the problem,
    and only when i found the problem i managed to find any information about
    this in bugzilla.

    A notice when you create XML node with ':' in name could save 2 days of my
    life )


    Really very hard to detect this mistake, i was googling, sitting in IRC
    and asking everyone for 48 hours without any result. And i think I'm not
    alone who "stepped on this rake"



    --
    Edit bug report at [url]http://bugs.php.net/?id=40567&edit=1[/url]
    --
    Try a CVS snapshot (PHP 4.4): [url]http://bugs.php.net/fix.php?id=40567&r=trysnapshot44[/url]
    Try a CVS snapshot (PHP 5.2): [url]http://bugs.php.net/fix.php?id=40567&r=trysnapshot52[/url]
    Try a CVS snapshot (PHP 6.0): [url]http://bugs.php.net/fix.php?id=40567&r=trysnapshot60[/url]
    Fixed in CVS: [url]http://bugs.php.net/fix.php?id=40567&r=fixedcvs[/url]
    Fixed in release: [url]http://bugs.php.net/fix.php?id=40567&r=alreadyfixed[/url]
    Need backtrace: [url]http://bugs.php.net/fix.php?id=40567&r=needtrace[/url]
    Need Reproduce Script: [url]http://bugs.php.net/fix.php?id=40567&r=needscript[/url]
    Try newer version: [url]http://bugs.php.net/fix.php?id=40567&r=oldversion[/url]
    Not developer issue: [url]http://bugs.php.net/fix.php?id=40567&r=support[/url]
    Expected behavior: [url]http://bugs.php.net/fix.php?id=40567&r=notwrong[/url]
    Not enough info: [url]http://bugs.php.net/fix.php?id=40567&r=notenoughinfo[/url]
    Submitted twice: [url]http://bugs.php.net/fix.php?id=40567&r=submittedtwice[/url]
    register_globals: [url]http://bugs.php.net/fix.php?id=40567&r=globals[/url]
    PHP 3 support discontinued: [url]http://bugs.php.net/fix.php?id=40567&r=php3[/url]
    Daylight Savings: [url]http://bugs.php.net/fix.php?id=40567&r=dst[/url]
    IIS Stability: [url]http://bugs.php.net/fix.php?id=40567&r=isapi[/url]
    Install GNU Sed: [url]http://bugs.php.net/fix.php?id=40567&r=gnused[/url]
    Floating point limitations: [url]http://bugs.php.net/fix.php?id=40567&r=float[/url]
    No Zend Extensions: [url]http://bugs.php.net/fix.php?id=40567&r=nozend[/url]
    MySQL Configuration Error: [url]http://bugs.php.net/fix.php?id=40567&r=mysqlcfg[/url]
    bpipe at mail dot ru Guest

  2. #2

    Default #40567 [Opn->Bgs]: DOMDoent->createElement()

    ID: 40567
    Updated by: [email]rrichardsphp.net[/email]
    Reported By: bpipe at mail dot ru
    -Status: Open
    +Status: Bogus
    Bug Type: Feature/Change Request
    PHP Version: 5.2.1
    New Comment:

    Thank you for taking the time to write to us, but this is not
    a bug. Please double-check the doentation available at
    [url]http://www.php.net/manual/[/url] and the instructions on how to report
    a bug at [url]http://bugs.php.net/how-to-report.php[/url]

    element names are already validated and cause an error to be issued.
    The ":" char is a valid character in an element name


    Previous Comments:
    ------------------------------------------------------------------------

    [2007-02-20 22:07:26] bpipe at mail dot ru

    Description:
    ------------
    DomDoent->CreateElement()
    I have a feature request, i think you should add a waring or notice
    when someone is calling CreateElement with ':' in node name.

    Like this one:
    $xsl->createElement('xsl:import');
    instead of CreateElementNS, because this problem is hard to detect
    (doent look like it should when you output it)
    I made this mistake myself and it took me 2 days to find out the
    problem, and only when i found the problem i managed to find any
    information about this in bugzilla.

    A notice when you create XML node with ':' in name could save 2 days of
    my life )


    Really very hard to detect this mistake, i was googling, sitting in IRC
    and asking everyone for 48 hours without any result. And i think I'm not
    alone who "stepped on this rake"




    ------------------------------------------------------------------------


    --
    Edit this bug report at [url]http://bugs.php.net/?id=40567&edit=1[/url]
    rrichards@php.net Guest

  3. #3

    Default #40567 [Bgs]: DOMDoent->createElement()

    ID: 40567
    User updated by: bpipe at mail dot ru
    Reported By: bpipe at mail dot ru
    Status: Bogus
    Bug Type: Feature/Change Request
    PHP Version: 5.2.1
    New Comment:

    "element names are already validated and cause an error to be issued.
    The
    ":" char is a valid character in an element name"
    Yes ":" is valid character for element name, i'm not sayng that you
    shouldn't allow to use it i'm sayng that you should generate a notice
    about it, it;s lika casting float value to int value in C++ (cimpiler
    generate a notice about possible loss of data), same here, when user
    creates Element with ":" after doent is saved the re will be not
    what he expect (this is lost of data) the part before ":" becomes
    NameSpace.


    Previous Comments:
    ------------------------------------------------------------------------

    [2007-02-21 17:16:17] [email]rrichardsphp.net[/email]

    Thank you for taking the time to write to us, but this is not
    a bug. Please double-check the doentation available at
    [url]http://www.php.net/manual/[/url] and the instructions on how to report
    a bug at [url]http://bugs.php.net/how-to-report.php[/url]

    element names are already validated and cause an error to be issued.
    The ":" char is a valid character in an element name

    ------------------------------------------------------------------------

    [2007-02-20 22:07:26] bpipe at mail dot ru

    Description:
    ------------
    DomDoent->CreateElement()
    I have a feature request, i think you should add a waring or notice
    when someone is calling CreateElement with ':' in node name.

    Like this one:
    $xsl->createElement('xsl:import');
    instead of CreateElementNS, because this problem is hard to detect
    (doent look like it should when you output it)
    I made this mistake myself and it took me 2 days to find out the
    problem, and only when i found the problem i managed to find any
    information about this in bugzilla.

    A notice when you create XML node with ':' in name could save 2 days of
    my life )


    Really very hard to detect this mistake, i was googling, sitting in IRC
    and asking everyone for 48 hours without any result. And i think I'm not
    alone who "stepped on this rake"




    ------------------------------------------------------------------------


    --
    Edit this bug report at [url]http://bugs.php.net/?id=40567&edit=1[/url]
    bpipe at mail dot ru Guest

  4. #4

    Default #40567 [Bgs->Opn]: DOMDoent->createElement()

    ID: 40567
    User updated by: bpipe at mail dot ru
    Reported By: bpipe at mail dot ru
    -Status: Bogus
    +Status: Open
    Bug Type: Feature/Change Request
    PHP Version: 5.2.1
    New Comment:

    I; not sayng this is bug, i marked this as feature request


    Previous Comments:
    ------------------------------------------------------------------------

    [2007-02-22 08:28:41] bpipe at mail dot ru

    "element names are already validated and cause an error to be issued.
    The
    ":" char is a valid character in an element name"
    Yes ":" is valid character for element name, i'm not sayng that you
    shouldn't allow to use it i'm sayng that you should generate a notice
    about it, it;s lika casting float value to int value in C++ (cimpiler
    generate a notice about possible loss of data), same here, when user
    creates Element with ":" after doent is saved the re will be not
    what he expect (this is lost of data) the part before ":" becomes
    NameSpace.

    ------------------------------------------------------------------------

    [2007-02-21 17:16:17] [email]rrichardsphp.net[/email]

    Thank you for taking the time to write to us, but this is not
    a bug. Please double-check the doentation available at
    [url]http://www.php.net/manual/[/url] and the instructions on how to report
    a bug at [url]http://bugs.php.net/how-to-report.php[/url]

    element names are already validated and cause an error to be issued.
    The ":" char is a valid character in an element name

    ------------------------------------------------------------------------

    [2007-02-20 22:07:26] bpipe at mail dot ru

    Description:
    ------------
    DomDoent->CreateElement()
    I have a feature request, i think you should add a waring or notice
    when someone is calling CreateElement with ':' in node name.

    Like this one:
    $xsl->createElement('xsl:import');
    instead of CreateElementNS, because this problem is hard to detect
    (doent look like it should when you output it)
    I made this mistake myself and it took me 2 days to find out the
    problem, and only when i found the problem i managed to find any
    information about this in bugzilla.

    A notice when you create XML node with ':' in name could save 2 days of
    my life )


    Really very hard to detect this mistake, i was googling, sitting in IRC
    and asking everyone for 48 hours without any result. And i think I'm not
    alone who "stepped on this rake"




    ------------------------------------------------------------------------


    --
    Edit this bug report at [url]http://bugs.php.net/?id=40567&edit=1[/url]
    bpipe at mail dot ru Guest

  5. #5

    Default #40567 [Opn->Bgs]: DOMDoent->createElement()

    ID: 40567
    Updated by: [email]tony2001php.net[/email]
    Reported By: bpipe at mail dot ru
    -Status: Open
    +Status: Bogus
    Bug Type: Feature/Change Request
    PHP Version: 5.2.1
    New Comment:
    >i'm not sayng that you shouldn't allow to use it i'm sayng
    >that you should generate a notice about it,
    It's a valid character, so no notice would make sense.


    Previous Comments:
    ------------------------------------------------------------------------

    [2007-02-22 08:32:48] bpipe at mail dot ru

    I; not sayng this is bug, i marked this as feature request

    ------------------------------------------------------------------------

    [2007-02-22 08:28:41] bpipe at mail dot ru

    "element names are already validated and cause an error to be issued.
    The
    ":" char is a valid character in an element name"
    Yes ":" is valid character for element name, i'm not sayng that you
    shouldn't allow to use it i'm sayng that you should generate a notice
    about it, it;s lika casting float value to int value in C++ (cimpiler
    generate a notice about possible loss of data), same here, when user
    creates Element with ":" after doent is saved the re will be not
    what he expect (this is lost of data) the part before ":" becomes
    NameSpace.

    ------------------------------------------------------------------------

    [2007-02-21 17:16:17] [email]rrichardsphp.net[/email]

    Thank you for taking the time to write to us, but this is not
    a bug. Please double-check the doentation available at
    [url]http://www.php.net/manual/[/url] and the instructions on how to report
    a bug at [url]http://bugs.php.net/how-to-report.php[/url]

    element names are already validated and cause an error to be issued.
    The ":" char is a valid character in an element name

    ------------------------------------------------------------------------

    [2007-02-20 22:07:26] bpipe at mail dot ru

    Description:
    ------------
    DomDoent->CreateElement()
    I have a feature request, i think you should add a waring or notice
    when someone is calling CreateElement with ':' in node name.

    Like this one:
    $xsl->createElement('xsl:import');
    instead of CreateElementNS, because this problem is hard to detect
    (doent look like it should when you output it)
    I made this mistake myself and it took me 2 days to find out the
    problem, and only when i found the problem i managed to find any
    information about this in bugzilla.

    A notice when you create XML node with ':' in name could save 2 days of
    my life )


    Really very hard to detect this mistake, i was googling, sitting in IRC
    and asking everyone for 48 hours without any result. And i think I'm not
    alone who "stepped on this rake"




    ------------------------------------------------------------------------


    --
    Edit this bug report at [url]http://bugs.php.net/?id=40567&edit=1[/url]
    tony2001@php.net Guest

Similar Threads

  1. Replies: 7
    Last Post: January 19th, 06:17 AM
  2. #39521 [NEW]: DomDoent::createElement() should warn you if you create invalid XML.
    By daniel dot oconnor at gmail dot com in forum PHP Bugs
    Replies: 0
    Last Post: November 15th, 06:04 AM
  3. #23185 [Fbk->NoF]: DomDoent->dump_file
    By sniper@php.net in forum PHP Development
    Replies: 0
    Last Post: August 13th, 09:33 AM
  4. using createElement with VBScript
    By Jeremy in forum ASP
    Replies: 1
    Last Post: July 23rd, 01:38 AM

Bookmarks

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139