Skip to content

Multiple issues in code examples in Level 18 #10

Description

Hi @TopSwagCode

  1. Code examples lack the @ sign next to attribute:
/*[starts-with(attribute^="value"]

//toy[starts-with(category,"Swim")] 


XPath syntax requires the @ sign before attribute

  1. There is one missing closing bracket in the first code snippet:

/*[starts-with(attribute^="value"]

should be:

/*[starts-with(attribute^="value")]

  1. The first code example for XPath uses CSS syntax

//*[starts-with(attribute^="value"]

this is not correct, should be

//*[starts-with(@attribute, "value")]

Once I added all the changes, I could pass level 18 with solution:

//*[starts-with(@for, "Sa")]

I figured it out by checking out some code examples on StackOverflow for the starts-with selector. Also looking back at other levels it was plain that something is not right in level 18.

Thanks for the tutorial, great stuff!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions