Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XPath bug (typo ?) in oscal_catalog_metaschema.xml #1951

Open
iMichaela opened this issue Oct 23, 2023 · 1 comment
Open

XPath bug (typo ?) in oscal_catalog_metaschema.xml #1951

iMichaela opened this issue Oct 23, 2023 · 1 comment
Labels

Comments

@iMichaela
Copy link
Contributor

iMichaela commented Oct 23, 2023

Describe the bug

Per the XPath tutorial, chapter Selecting nodes:

Expression Description
nodename Selects all nodes with the name "nodename"
/ Selects from the root node
// Selects nodes in the document from the current node that match the selection no matter where they are
. Selects the current node
.. Selects the parent of the current node
@ Selects attributes

the following XPath are indicating a selection of the part, andprop respectively from the root and not from the current node (part ) when related to the assessment-methods of a control statement. I believe the intention was for the Path to represent a selection from the current node since an assessment-method is defined in the context of a control statement :

Line number Current Path Corrected Path
285 part[has-oscal-namespace('http://csrc.nist.gov/ns/oscal') and @name=('assessment','assessment-method')]/part[has-oscal-namespace('http://csrc.nist.gov/ns/oscal')]/@name part[has-oscal-namespace('http://csrc.nist.gov/ns/oscal') and @name=('assessment','assessment-method')]//part[has-oscal-namespace('http://csrc.nist.gov/ns/oscal')]/@name
299 part[has-oscal-namespace('http://csrc.nist.gov/ns/oscal') and @name=('assessment','assessment-method')]/prop[has-oscal-namespace('http://csrc.nist.gov/ns/rmf')]/@name part[has-oscal-namespace('http://csrc.nist.gov/ns/oscal') and @name=('assessment','assessment-method')]//prop[has-oscal-namespace('http://csrc.nist.gov/ns/rmf')]/@name
305 part[has-oscal-namespace('http://csrc.nist.gov/ns/oscal') and @name=('assessment','assessment-method')]/prop[has-oscal-namespace(('http://csrc.nist.gov/ns/oscal','http://csrc.nist.gov/ns/rmf')) and @name='method']/@value part[has-oscal-namespace('http://csrc.nist.gov/ns/oscal') and @name=('assessment','assessment-method')]//prop[has-oscal-namespace(('http://csrc.nist.gov/ns/oscal','http://csrc.nist.gov/ns/rmf')) and @name='method']/@value

Who is the bug affecting

OSCAL catalog developers and OSCAL content users

What is affected by this bug

Documentation, Metaschema, Tooling & API

How do we replicate this issue

Review oscal_catalog_metaschema.xml

Expected behavior (i.e. solution)

Line number Current Path Corrected Path
285 part[has-oscal-namespace('http://csrc.nist.gov/ns/oscal') and @name=('assessment','assessment-method')]/part[has-oscal-namespace('http://csrc.nist.gov/ns/oscal')]/@name part[has-oscal-namespace('http://csrc.nist.gov/ns/oscal') and @name=('assessment','assessment-method')]//part[has-oscal-namespace('http://csrc.nist.gov/ns/oscal')]/@name
299 part[has-oscal-namespace('http://csrc.nist.gov/ns/oscal') and @name=('assessment','assessment-method')]/prop[has-oscal-namespace('http://csrc.nist.gov/ns/rmf')]/@name part[has-oscal-namespace('http://csrc.nist.gov/ns/oscal') and @name=('assessment','assessment-method')]//prop[has-oscal-namespace('http://csrc.nist.gov/ns/rmf')]/@name
305 part[has-oscal-namespace('http://csrc.nist.gov/ns/oscal') and @name=('assessment','assessment-method')]/prop[has-oscal-namespace(('http://csrc.nist.gov/ns/oscal','http://csrc.nist.gov/ns/rmf')) and @name='method']/@value part[has-oscal-namespace('http://csrc.nist.gov/ns/oscal') and @name=('assessment','assessment-method')]//prop[has-oscal-namespace(('http://csrc.nist.gov/ns/oscal','http://csrc.nist.gov/ns/rmf')) and @name='method']/@value

Other comments

No response

Revisions

No response

@iMichaela iMichaela added the bug label Oct 23, 2023
@iMichaela iMichaela changed the title Path bug (typo ?) in oscal_catalog_metaschema.xml XPath bug (typo ?) in oscal_catalog_metaschema.xml Oct 23, 2023
@Arminta-Jenkins-NIST
Copy link
Contributor

At the 11/16 Triage Meeting: We will discuss this on Nov 30.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Needs Triage
Development

No branches or pull requests

2 participants