示例#1
0
bool
txXSLTNumber::getPrevInDocumentOrder(txXPathTreeWalker& aWalker)
{
    if (aWalker.moveToPreviousSibling()) {
        while (aWalker.moveToLastChild()) {
            // do nothing
        }
        return true;
    }
    return aWalker.moveToParent();
}
示例#2
0
int32_t
txXSLTNumber::getSiblingCount(txXPathTreeWalker& aWalker,
                              txPattern* aCountPattern,
                              txIMatchContext* aContext)
{
    int32_t value = 1;
    while (aWalker.moveToPreviousSibling()) {
        if (aCountPattern->matches(aWalker.getCurrentPosition(), aContext)) {
            ++value;
        }
    }
    return value;
}