Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7969499
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T07:14:46+00:00 2026-06-04T07:14:46+00:00

I have the following xml:- <?xml version=1.0 encoding=UTF-8?> <patent-assignment> <assignment-record> <correspondent> <name>NORTH AMERICA INTERNATIONAL

  • 0

I have the following xml:-

<?xml version="1.0" encoding="UTF-8"?>
<patent-assignment>
  <assignment-record>
    <correspondent>
      <name>NORTH AMERICA INTERNATIONAL PATENT OFFIC</name>
      <address-1>P.O. BOX 506</address-1>
      <address-2>MERRIFIELD, VA 22116</address-2>
    </correspondent>
   </assignment-record>
  <patent-assignors>
    <patent-assignor>
      <name>TSAI, YU-WEN</name>
      <execution-date>
    <date>20050331</date>
      </execution-date>
    </patent-assignor>
    <patent-assignor>
      <name>HUANG, CHENG-I</name>
      <execution-date>
    <date>20050331</date>
      </execution-date>
    </patent-assignor>
  </patent-assignors>
  <patent-assignees>
    <patent-assignee>
      <name>FARADAY TECHNOLOGY CORP.</name>
      <address-1>NO.10-2, LI-HSIN ROAD 1, SCIENCE-BASED INDUSTRIAL PARK</address-1>
      <city>HSIN-CHU CITY</city>
      <country-name>TAIWAN</country-name>
    </patent-assignee>
  </patent-assignees>
 </patent-assignment>

Now at the time of loading document into Marklogic I want to change patent-assignor’s element name to assignor-name and patent-assignee’s element name to assignee-name but I want to load data with Record Loader not with Marklogic’s Information Studio. How can I do this with Record Loader ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T07:14:47+00:00Added an answer on June 4, 2026 at 7:14 am

    You will need to set CONTENT_FACTORY_CLASSNAME=com.marklogic.recordloader.xcc.XccModuleContentFactory and write an XQuery module to implement the content module. There is an example module at http://marklogic.github.com/recordloader/ which you can customize. Your transform code would go in the local:do() function, replacing the example “lower-case element localnames” code:

    xquery version "1.0-ml";
    
    declare variable $URI as xs:string external;
    declare variable $XML-STRING as xs:string external;
    declare variable $NAMESPACE as xs:string external;
    declare variable $LANGUAGE as xs:string external;
    declare variable $ROLES-EXECUTE as xs:string external;
    declare variable $ROLES-INSERT as xs:string external;
    declare variable $ROLES-READ as xs:string external;
    declare variable $ROLES-UPDATE as xs:string external;
    declare variable $COLLECTIONS as xs:string external;
    declare variable $SKIP-EXISTING as xs:boolean external;
    declare variable $ERROR-EXISTING as xs:boolean external;
    declare variable $FORESTS as xs:string external;
    
    declare function local:do($list as node()*)
     as node()*
    {
      for $n in $list return typeswitch($n)
      (: lower-case element localnames :)
      case element() return element {
        QName(namespace-uri($n), lower-case(local-name($n)))
      } {
        $n/@*, local:do($n/node())
      }
      case document-node() return document { local:do($n/node()) }
      default return $n
    };
    
    if ($SKIP-EXISTING and doc($URI)) then ()
    else if ($ERROR-EXISTING and doc($URI)) then error((), 'DUPLICATE-URI', $URI)
    else xdmp:document-insert(
      $URI,
      local:do(xdmp:unquote(
        $XML-STRING,
        $NAMESPACE,
        if ($LANGUAGE) then concat('default-language=', $LANGUAGE) else ()
      )),
      (
        for $r in tokenize($ROLES-EXECUTE, ',')[. ne '']
        return xdmp:permission('execute', $r),
        for $r in tokenize($ROLES-INSERT, ',')[. ne '']
        return xdmp:permission('insert', $r),
        for $r in tokenize($ROLES-READ, ',')[. ne '']
        return xdmp:permission('read', $r),
        for $r in tokenize($ROLES-UPDATE, ',')[. ne '']
        return xdmp:permission('update', $r)
      ),
      tokenize($COLLECTIONS, ',')[. ne ''],
      0,
      for $id in tokenize($FORESTS, ',')[. ne '']
      return xs:unsignedLong($id)
    )
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following xml:- <?xml version=1.0 encoding=UTF-8?> <patent-assignment> <assignment-record> <correspondent> <name>NORTH AMERICA INTERNATIONAL
I have the following XML Document: <?xml version=\1.0\ encoding=\UTF-8\?> <atom:entry xmlns:atom=\http://www.w3.org/2005/Atom\ xmlns:apps=\http://schemas.google.com/apps/2006\ xmlns:gd=\http://schemas.google.com/g/2005\> <apps:property
I have the following simplified XML: <?xml version="1.0" encoding="UTF-8" ?> <MATMAS05> <IDOC BEGIN="1"> <E1MARAM
I have the following simplified XML structure: <?xml version="1.0" encoding="UTF-8" ?> <INVOIC02> <IDOC BEGIN="1">
I have the following xml object representing a ImageButton <?xml version=1.0 encoding=utf-8?> <ImageButton xmlns:android=http://schemas.android.com/apk/res/android
I have the following layout in XML (splashscreen.xml): <?xml version=1.0 encoding=utf-8?> <FrameLayout xmlns:android=http://schemas.android.com/apk/res/android android:id=@+id/frmLayout
I have the following layout defined in XML: <?xml version=1.0 encoding=utf-8?> <RelativeLayout xmlns:android=http://schemas.android.com/apk/res/android android:layout_height=wrap_content
I have the following layout for a dialog: <?xml version=1.0 encoding=utf-8?> <TableLayout xmlns:android=http://schemas.android.com/apk/res/android android:id=@+id/categorylist
I have the following XML: <?xml version=1.0 encoding=UTF-16?> <APIDATA xmlns=api-com> <ORDER EngineID=1 OrderID=66><INSTSPECIFIER InstID=27
I have the following layout with an imageview and textfield, <?xml version=1.0 encoding=utf-8?> <RelativeLayout

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.