Menu

#40 Case_Folding and Attribut

V3.5
open
Engine (48)
5
2004-09-20
2004-09-09
Anonymous
No

I'm using the version 3.5 of your library

here a small portion of the xml file that I use
<?xml version="1.0" standalone="yes" ?>
<Root DefaultDocName="UserGuide">
<DocName Name="AdminGuide" >
<Doc version="1.0"
lang="en">/en/1.0/AdminGuide.pdf</Doc>
<Doc version="1.1"
lang="en">/en/1.1/AdminGuide.pdf</Doc>
</DocName>
</Root>

Doing this query $xPath->getAttributes
("/Root","DefaultDocName") return false with those option
XML_OPTION_CASE_FOLDING => TRUE,
XML_OPTION_SKIP_WHITE => TRUE

Doing this query $xPath->getAttributes
("/Root","DEFAULTDOCNAME") return false with those
option
XML_OPTION_CASE_FOLDING => TRUE,
XML_OPTION_SKIP_WHITE => TRUE

Doing this query $xPath->getAttributes
("/Root","DefaultDocName") return true with those option
XML_OPTION_CASE_FOLDING => FALSE,
XML_OPTION_SKIP_WHITE => TRUE

The attribut name need to be case insentive when the
XML_OPTION_CASE_FOLDING is set to TRUE

Thank

Martin
Network Admin
TimeSpring Software Corporation
martin.proulx@timespring.com

Discussion

  • Nigel Swinson

    Nigel Swinson - 2004-09-20
    • milestone: --> 314382
    • assigned_to: nobody --> nigelswinson
     
  • Nigel Swinson

    Nigel Swinson - 2004-09-20

    Logged In: YES
    user_id=270120

    Hmm, I don't seem to get the same results as you do. I get
    this:

    Folding: TRUE, match only if "DEFAULTDOCNAME"
    Folding: FALSE, match only if "DefaultDocName"

    But you say that with Folding:TRUE that it "returns false"
    when searching for DEFAULTDOCNAME?

    Reading between the lines, are you saying that it should
    work such that when Folding = TRUE, the element names
    and attribute names should be case insensitive? ie add
    these lines into getAttributes():

    if (!empty($this->parseOptions
    [XML_OPTION_CASE_FOLDING])) {
    // Case in-sensitive
    $attrName = strtoupper($attrName);
    }

    ?

    Nigel

     
  • Nigel Swinson

    Nigel Swinson - 2004-09-20
    • milestone: 314382 --> V3.5
     

Log in to post a comment.