Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

{"bookstore":{"bookstore-name": "Chapters","categories":[{"code":"01","name":"SciFi",books [{langen"price":1099,"title":"FarHorizons","authors":["davidBrin","UrsulaK.LeGuin, "RoberSilverberg",OrsonScott Card"GregBear",JoeHaldeman","DanSimmons"],"pub_year":1999}{lang":en""price": 895,"title":FeersumEndjinn"authors":[Iain M. Banks],"pub_year":1994}]},{"code":"02",kids,"books":[{langen"price": 699, titleThe Golden Compassauthors"Philip Pullman"]pub_year1995}]}} }{ "stores:categories": [{ code02books { "title": "A Horror book"price":"2000","pub_year": 2003,lang": "English",authors[ "Joe & Rahul"
Scenario 1: XPath is pointing to root i.e. '/'

NCMP Passthrough operation outputCPS Core output
Response


Code Block
collapsetrue
{
    "stores:bookstore": {
        "bookstore-name": "Chapters",
        "categories": [
      {      {
      "code": "01",         "namecode": "SciFi02",
        "books": [       "books": [
   {              "lang": "en",  {
          "price": 895,             "title": "FeersumThe Golden EndjinnCompass",
            "authors": [               "Iain M. Banks""price": "699",
            ],             "pub_year": 19941995,
          },           {   "lang": "en",
        "lang": "en",                "priceauthors": 1099,[
            "title": "Far Horizons",                "authorsPhilip Pullman":
[               "david Brin",        ]
      "Ursula K. Le Guin",           }
   "Rober Silverberg",            ],
  "Orson Scott Card",            "name": "kids"
 "Greg Bear",          },
    "Joe Haldeman",       {
       "Dan Simmons"        "code": "01",
   ],             "pub_yearbooks": [
1999             }       {
 ]       },       {         "codetitle": "02Feersum Endjinn",
        "name": "kids",         "books": [     "price": "895",
       {                 "langpub_year": "en"1994,
 
          "price": 699,             "titlelang": "The Golden Compassen",
            "authors": [           "authors": [
   "Philip Pullman"             ],           "Iain M. Banks"pub_year":
1995           }         ]    ]
  }     ]   } }
Scenario 2: Container XPath i.e '/bookstore'
NCMP Passthrough operation outputCPS Core outputResponse
Code Block
collapsetrue
Code Block
collapsetrue
   
 
     
},
        
 
       
    {
    
 
         
 
         "
title":
 "Far Horizons",
           
             "
price": "
1099",
            
 
           "pub_year": 1999,
 
 
             
 
        "lang": "en",
     
 
               
 
 
 
"authors"
: 
[
            
 
               "
david 
Brin",
              
  
            "Ursula K. Le Guin"
,
               
 
            "Rober 
Silverberg",
                  
 
         "Orson Scott 
Card",
          
                  "
Greg Bear"
,
            
               
 "
Joe 
Haldeman",
            
 
               "
Dan Simmons"
            
            ]
 
           
        }
       
       
  ],
      
 
         "name": "
SciFi"

          
 
 }
        ]
    }
}



Code Block
collapsetrue
{
  "bookstore": {
    "
bookstore-name": "
Chapters",
    "categories": [
      
{
        
"
code": "
01",
        "name": "SciFi",
        "
books": [
          {
   
         "lang": "en",
            "price": 
895,
            "
title": 
"Feersum Endjinn",
         
   "authors": [
    
       
   "Iain M. Banks"
            ],
            "pub_year": 1994
 

Scenario 3: List attributes XPath

'/bookstore/categories[@code='02']'

'/ncmp/v1/ch/PNFDemo/data/ds/ncmp-datastore:passthrough-running?resourceIdentifier=stores:bookstore/categories=02'

NCMP Passthrough outputCPS Core outputResponse
Code Block
collapsetrue
         },
          {
            "lang": "en",
            "price": 1099,
            
"
title": "
Far Horizons",
            "
authors": [
              
"david Brin",
              
"Ursula K. Le Guin",
              "Rober Silverberg",
    
 
         "Orson Scott Card",
         
     "Greg Bear",
              "
Joe Haldeman",
              "Dan Simmons"
            ],
            "
pub_year": 
1999
          }
        ]
      
},
      {
        "code": "02",
        "name": "kids",
        "books": [
          {
            "lang": "en",
            "price": 699,
            "title": "The Golden Compass",
            "authors": [
              "Philip Pullman"
            ],
            "pub_year": 1995
          }
        ]
      }
    ]
  }
}


Scenario 2: Container XPath i.e '/bookstore'

NCMP Passthrough operation outputCPS Core output
Response


Code Block
collapsetrue



Code Block
collapsetrue
{
  "bookstore": {
    "bookstore-name": "Chapters",
    "categories": [
      {
        "code": "01",
        "name": "SciFi",
        "books": [
          {
            "lang": "en",
            "price": 1099,
            "title": "Far Horizons",
            "authors": [
              "david Brin",
              "Ursula K. Le Guin",
              "Rober Silverberg",
              "Orson Scott Card",
              "Greg Bear",
              "Joe Haldeman",
              "Dan Simmons"
            ],
            "pub_year": 1999
          },
          {
            "lang": "en",
            "price": 895,
            "title": "Feersum Endjinn",
            "authors": [
              "Iain M. Banks"
            ],
            "pub_year": 1994
          }
        ]
      },
      {
        "code": "02",
        "name": "kids",
        "books": [
          {
            "lang": "en",
            "price": 699,
            "title": "The Golden Compass",
            "authors": [
              "Philip Pullman"
            ],
            "pub_year": 1995
          }
        ]
      }
    ]
  }
}


Scenario 3: List attributes XPath

'/bookstore/categories[@code='02']'

'/ncmp/v1/ch/PNFDemo/data/ds/ncmp-datastore:passthrough-running?resourceIdentifier=stores:bookstore/categories=02'


NCMP Passthrough outputCPS Core output
Response


Code Block
collapsetrue
{
    "stores:categories": [
        {
          ]  "code": "02",
             },"books": [
                {
                    "title": "AThe New book in existing categoryGolden Compass",
                    "price": "2000699",
                    "pub_year": 20031995,
                    "lang": "Englishen",
                    "authors": [
                        "JoePhilip & RahulPullman"
                    ]
                }
            ],
            "name": "Horrorkids"
        }
    ]
}



Code Block
collapsetrue
{
  "categories": {
    "code": "02",
    "name": "kids",
    "books": [
      {
        "lang": "en",
        "price": 699,
        "title": "The Golden Compass",
        "authors": [
          "Philip Pullman"
        ],
        "pub_year": 1995
      }
    ]
  }
}


...