XPath for JSR-170

I have some questions about the XPath expressions to be used with JSR-170. Is there any forum that is out there for this? Or, should I post my questions here!
Anyways, there is 1 question (not entirely JSR-related) that I have -
/page1/page2//*[fn:name(),'page3']
I assume the above query would return "all pages under /page1/page2 that have the name 'page3'. Can this however not be achieved by the following query -
/page1/page2//*[@name,'page3']
In the JSR world, this returns nodes named 'page3' from a repository and the repository has an attribute called "name" for this node type. Would this not work in the usual XML scenario as the particular tag doesn't have an attribute called "name". Meaning, it is something like -
<page3>
as opposed to
<page name="page3">
Thanks!

you might want to post this question in the jackrabbit developer list:
http://incubator.apache.org/jackrabbit/
http://incubator.apache.org/jackrabbit/mail-lists.html
cheers
stefan

Similar Messages

  • Is there a forum for JSR-170?

    I'm working on implementing the JSR-170 APIs and am looking for a relevant forum to post questions. Thanks.

    I tried to google it as well, but couldn't find a
    forum as such.My bad - I didn't delve into all the links and can see where you might have run into trouble. Sorry about that.
    I suppose this'd be as good a place as any, but I don't personally have experience with content repository APIs...
    Good luck!

  • Support for JSR 170

    Does the UCM support JSR 170 (Java API for Content Repository) through the Content Integration Suite or other means?

    jstortz wrote:
    Most of the info I've seen about this has been from David Roe's blog, he has two posts on this.
    [http://contentoncontentmanagement.com/2008/07/22/jcr-for-ucmwhen-did-that-happen/]
    and
    [http://contentoncontentmanagement.com/2008/08/12/jcr-follow-up/]
    Thanks but the link provided does not seem to answer my question either.

  • Oracle Content Management and JSR 170

    Does anbody know whether latest Oracle Content Management SDK have implemented support for JSR 170?
    I cannot find this information a anywhere.

    hi tom,
    this is the portal content management forum. could you please post your question in the CM SDK forum here:
    http://forums.oracle.com/forums/forum.jsp?forum=152
    thanks,
    christian

  • Oracle 10 and JSR 170

    Does anbody know whether latest Oracle Content Management SDK have implemented support for JSR 170?
    I cannot find this information a anywhere.

    hi tom,
    this is the portal content management forum. could you please post your question in the CM SDK forum here:
    http://forums.oracle.com/forums/forum.jsp?forum=152
    thanks,
    christian

  • Usage of JSR 170 for B2C Prod Ready?

    Hi all,
    since I didn't found any references, I'm interested to know if someone here has successfully implemented a B2C high volume site with WebLogic Portal , using Content Presenter, the JSR170 adaptor and an enterprise JSR 170 repository.
    We are looking for references where this stack is used , but right know havn't found any.
    Besides JSR 170 usage: It's even difficult (for us) to find references at all, where Web logic Portal is used for public web sites for a large enterprise with high volume access.
    Any hints? Perhaps with a link?
    Thanks a lot.

    Hi all,
    since I didn't found any references, I'm interested to know if someone here has successfully implemented a B2C high volume site with WebLogic Portal , using Content Presenter, the JSR170 adaptor and an enterprise JSR 170 repository.
    We are looking for references where this stack is used , but right know havn't found any.
    Besides JSR 170 usage: It's even difficult (for us) to find references at all, where Web logic Portal is used for public web sites for a large enterprise with high volume access.
    Any hints? Perhaps with a link?
    Thanks a lot.

  • Does the bea content repository is JSR-170 compliant

    Hi ALL,
    Actually i want to use the bea content repository form my web service so should i go for SPI interface or i should use the JCR (Java Conetnt repository)API.
    But i would be able to use the JCR interface only if the bea content repository is JSR 170 compliant.
    Pls. suggest me the right way.
    Thanks.........

    The BEA repository is not yet JSR-170 compliant.

  • TS1702 I downloaded from the Apps.store a game named 'Ninja Run'. When I was playing this game, I got out and then received a message,'"Do you want to buy 5 revivals for Rs.170/-?". When I clicked the "Buy"

    I downloaded from the Apps.store a game named,"Ninja Run". When I was plkaying the game, I got out and a message appeared, asking me whether I would like to buy 5 revivals for Rs.170/-. When I hit the,"Buy"button, I was asked to confirm my Credit card details. I confirmed it and was asked to enter the Security Code. When I did so,, a message appeared telling me that the Security Code was invalid and the purchase could not be completed. When I continued the game and got out again, the message appeared again asking me whether I wanted to buy. Thinking that my purchase was not completed, I again hit the,"Buy" button. Nothing happened. I continued the game and when I got out, I received the same message and obliged accordingly. This went on for three or more times. By this time,however I got confused and quit the game. All these things happened on 6th September 2013. The next day,I was shocked to see 5 receipts from the Apple Apps.store in the In Box of my email account,each for Rs.170/-
    totalling Rs850/. Worse still, when I played the game the next day and got out and asked for a revival, would you believe it, I was again asked whether I would like to buy 5 revivals for Rs.170/-.
    Thus,I ended up buying a game for Rs.850/- while the actual price is only Rs.170/-,and not even able to play the full game.
    Could anyone please tell me whether I can get a refund of Rs.680/-,the extra amount I  paid for this game.
    I will be much thankful to anyone who can guide me and help me claim the refund. Thank everyone.

    For customer service issues, go here...
    https://expresslane.apple.com/Issues.action

  • Using XPath for DOM traversal

    This question falls into the category of 'I know it's possible, I just need to find the idom in Java'.
    I'm coming from a MSFT world were the DOM-centric model of XML processing makes heavy use of XPATH for node selection. Basically using the method element.selectNodes(XPathExpresson) allows one to quickly extract the relevant subset of the parsed tree in the DOM as a nodeList. I've become accustomed to using XML for all strucutured storage that doesn't require a full database.
    The W3C DOM Level 3 spec supports evaluateExpression() for this purpose, but I can't believe that Java developers are still using tree traversal waiting for the spec to be implemented. I suppose that I could use getNodesByTagName(), but this is a chainsaw, and I need a scalpel. Anyway, I'm trying to figure out how, exactly, this gets done in Java.
    I figure the following are possibilities:
    1) It's in JAXP and I missed it
    2) One or more of the XML parsers supports XPATH as an extention
    3) There's a common package that sits on top of the DOM Document.
    4) There's a standard way to apply and XSLT methods to the DOM document
    5) Something I've never thought of.
    This is a generalized problem for me, so I can't rely on object serialization, Java-XML data mapping, etc. Any guidance would be greatly appreciated.

    I've written a Config file reader for XML in java,
    and it extracts values using XPath. This is
    some of the code you'll need:
    imports:
    import javax.xml.transform.TransformerException;
    import org.w3c.dom.*;
    import org.xml.sax.InputSource;
    import org.xml.sax.SAXException;
    import org.apache.xerces.parsers.DOMParser;
    import org.apache.xpath.XPathAPI;
    import org.apache.xpath.objects.*;
    Document doc=....;
    * returns a single DOM Node from the config file.
    public Node getNode(String xpath) throws ConfigException {
    try {
    return XPathAPI.selectSingleNode(doc, xpath);
    } catch (TransformerException e) {
    throw new ConfigException("Can't find '"+xpath+"' ("+e.getMessage()+")");

  • Adding fields in pa30 for IT 170

    hi
    i have added some custom  fields for infotype 170 in se11.now i want to see those fields in pa30 for that infotype 170(when i use it for a pernr in the display screen). how can i do that.
    any help in this regard wud be appreciated.
    thanks

    Hello Alan,
    Following are the steps from this Enhancement in infotype 0006
    Go to Tcode PM01, select the third tab frm left ie. enhance infotypes. Select CI include and press Create.
    Enter all the fields you want over here and then activate . Then come out and then select the module pool option there u get a bunch of includes
    INCLUDE ZP000610.(Global Data)
    INCLUDE MPPDAT00.
    INCLUDE FP50PPSB.
    INCLUDE MPPERS00.
    INCLUDE ZP000620.(PBO module)
    INCLUDE ZP000630.(PAI module)
    INCLUDE ZP000640.(form routines)
    You put in the code in the zp includes, activate come out and then select the third option in the check box ie.include screen.Customize the screen then after u come out there is a assign enhancement button on top, there u need to assign the program name like zp000600 and screen 0200 to the standard one.
    Regards,
    Ahmad

  • Xpath for dynamic image update

    I am trying to get the image from the Astronomy Photo of the
    Day APOD website to display on our college departments Astronomy
    web page. I just need to display the image and not the whole page.
    As I was searching for ways to scrape dynamic images I came
    across the ability for Firebug to extract the xpath from any block
    of html. In the case of apod the xpath for image is this:
    /html/body/center/p[2]/a/img
    Could I use Spry to display the image of the day using xpath
    or is the wrong way to accomplish this?

    after loading an image you can get its contentWidth and
    contentHeight, with this you then calculate the aspect ratio and
    resize your container accordingly so that there is no white space.
    i.e
    MyImg.addEventListener(Event.COMPLETE,UpdateContainer)
    private function UpdateContainer(e:Event):void
    var AspectRatio : Number =
    MyImg.contentWidth/MyImage.contentHeight;
    MyContainer.width = MyContainer.height*AspectRatio;
    MyImg.width = MyContainer.width;
    MyImg.height=MyContainer.height;
    MyContainer.addChild(MyImg);
    the assumption here is you are basing the container height as
    the fixed constant obviously you can set width as the fixed
    constant and adjust height by aspect ratio

  • Test for JSR-82

    Is it possible to perform a test to see if a particular phone supports JSR82?
    I have two phones, one which supports JSR-82 and one which doesn't. My app works fine on the phone that supports JSR-82 but on the one that doesn't I get an error stating "java.lang.NoClassDefFoundError: javax/bluetooth/DiscoveryListener".
    Ideally, what I want to do is test for JSR-82 compatibility on launch, catch an exception and then gracefully inform the user of the incompatibility.

    you can try:
    try{
       Class c=Class.forName("javax.bluetooth.DiscoveryListener")
       // bluetooth supported
    }catch(ClassNotFoundException cnfe){
      // bluetooth unsupported
    }

  • Getting outOfMemory while using Xpath for 6MB file

    Hi ,
    Requirement:
    I have thousands of xml files of variable size (mostly around 5MB), Total size is around 20GB .The structure of xml content is as follows.
    filename: xaaaa
    <file>
    <page>
    <title>AmericanSamoa</title>
    <id>6</id>
    <revision>
    <id>133452270</id>
    <timestamp>2007-05-25T17:12:06Z</timestamp>
    <contributor>
    <username>Gurch</username>
    <id>241822</id>
    </contributor>
    <minor />
    <comment>Revert edit(s) by [[Special:Contributions/Ngaiklin|Ngaiklin]] to last version by [[Special:Contributions/Docu|Docu]]</comment>
    <text xml:space="preserve">#REDIRECT [[American Samoa]]{{R from CamelCase}}</text>
    </revision>
    </page>
    My task is to retrieve the ID , filename in which it exists and the position of node in the page, and i have to write it to a file.
    ex: 6:xaaaa:1
    My approach:
    I am using Xpath for this. The code is as follows.
    */*XPathReader.java*/*
    package preprocess;
    import java.io.IOException;
    import javax.xml.XMLConstants;
    import javax.xml.namespace.QName;
    import javax.xml.parsers.*;
    import javax.xml.xpath.*;
    import org.w3c.dom.Document;
    import org.xml.sax.SAXException;
    public class XPathReader {
    private String xmlFile;
    private Document xmlDocument;
    private XPath xPath;
    public XPathReader(String xmlFile) {
    this.xmlFile = xmlFile;
    initObjects();
    private void initObjects(){       
    try {
    xmlDocument = DocumentBuilderFactory.
                   newInstance().newDocumentBuilder().
                   parse(xmlFile);
    xPath = XPathFactory.newInstance().
                   newXPath();
    } catch (IOException ex) {
    ex.printStackTrace();
    } catch (SAXException ex) {
    ex.printStackTrace();
    } catch (ParserConfigurationException ex) {
    ex.printStackTrace();
    public Object read(String expression,
                   QName returnType){
    try {
    XPathExpression xPathExpression =
                   xPath.compile(expression);
    return xPathExpression.evaluate
                   (xmlDocument, returnType);
    } catch (XPathExpressionException ex) {
    ex.printStackTrace();
    return null;
    XpathReaderTest.java
    /* it takes directory name as argument, this directory contains xml file*/
    package preprocess;
    import java.io.*;
    import javax.xml.xpath.XPathConstants;
    import org.w3c.dom.*;
    public class XPathReaderTest {
    public XPathReaderTest() {
    public static void main(String[] args) throws IOException{
         if (args.length <= 0) {
              System.out.println(
              "Usage: java PreProcess dir_name"
              return;
              String dir=null;
              if (args.length >= 1) dir = args[0];
              int indexno=0;
              File directory = new File(dir);
              File[] files = directory.listFiles();
              FileWriter fstream = new FileWriter("index"+indexno+".txt");
         BufferedWriter out = new BufferedWriter(fstream);
         XPathReaderTest xt=new XPathReaderTest();
              /*for (int index = 0; index < files.length; index++)
                   System.out.println(files[index].toString());
              for (int index = 0,i=1; index < files.length; index++)
                   /*if(index/100>indexno){
                        indexno++;
                        out.close();
                        fstream = new FileWriter("index"+indexno+".txt");
                   out = new BufferedWriter(fstream);
                   xt.extract(files[index].toString(),index,i,out);
                   System.gc();
              out.close();
    public void extract(String completepath,int index,int i,BufferedWriter out)
    throws IOException
         System.out.println(index+" "+completepath);
              XPathReader reader = new XPathReader(completepath);
              String separator = File.separator;
              int pos = completepath.lastIndexOf(separator);
              String temp_fname=completepath.substring(0,pos);
              pos=temp_fname.lastIndexOf(separator);
              String f_name= completepath.substring(pos+1);
              i=1;
              while(true)
              String expression = "/file/page["+i+"]/id";
              String id_value= (String) reader.read(expression, XPathConstants.STRING);
              if(id_value=="")
                   break;
              out.write( id_value + ":"+ f_name+ ":"+i+ "\n" );
    i++;
    Problem:
    This code works fine for xml files < 6MB, but its giving outOfMemory for 6MB and above file.
    I have tried with -Xms256m -Xmx512m option.
    Please suggest the work around , or any modification to code that will resolve my problem.
    I am new to java world , so problem root cause will be very helpful for me.
    Thanks

    Hi ,
    Requirement:
    I have thousands of xml files of variable size (mostly around 5MB), Total size is around 20GB .The structure of xml content is as follows.
    /*filename: xaaaa*/
    <file>
    <page>
        <title>AmericanSamoa</title>
        <id>6</id>
        <revision>
          <id>133452270</id>
          <timestamp>2007-05-25T17:12:06Z</timestamp>
          <contributor>
            <username>Gurch</username>
            <id>241822</id>
          </contributor>
          <minor />
          <comment>Revert edit(s) by [[Special:Contributions/Ngaiklin|Ngaiklin]] to last version by [[Special:Contributions/Docu|Docu]]</comment>
          <text xml:space="preserve">#REDIRECT [[American Samoa]]{{R from CamelCase}}</text>
        </revision>
      </page>
    </file>My task is to retrieve the ID , filename in which it exists and the position of node in the page, and i have to write it to a file.
    ex: 6:xaaaa:1
    My approach:
    I am using Xpath for this. The code is as follows.
    */*XPathReader.java*/*
    package preprocess;
    import java.io.IOException;
    import javax.xml.XMLConstants;
    import javax.xml.namespace.QName;
    import javax.xml.parsers.*;
    import javax.xml.xpath.*;
    import org.w3c.dom.Document;
    import org.xml.sax.SAXException;
    public class XPathReader {
        private String xmlFile;
        private Document xmlDocument;
        private XPath xPath;
        public XPathReader(String xmlFile) {
            this.xmlFile = xmlFile;
            initObjects();
        private void initObjects(){       
            try {
                xmlDocument = DocumentBuilderFactory.
                   newInstance().newDocumentBuilder().
                   parse(xmlFile);           
                xPath =  XPathFactory.newInstance().
                   newXPath();
            } catch (IOException ex) {
                ex.printStackTrace();
            } catch (SAXException ex) {
                ex.printStackTrace();
            } catch (ParserConfigurationException ex) {
                ex.printStackTrace();
        public Object read(String expression,
                   QName returnType){
            try {
                XPathExpression xPathExpression =
                   xPath.compile(expression);
                return xPathExpression.evaluate
                   (xmlDocument, returnType);
            } catch (XPathExpressionException ex) {
                ex.printStackTrace();
                return null;
    XpathReaderTest.java
    /* *it takes directory name as argument, this directory contains xml file**/
    package preprocess;
    import java.io.*;
    import javax.xml.xpath.XPathConstants;
    import org.w3c.dom.*;
    public class XPathReaderTest {
        public XPathReaderTest() {
        public static void main(String[] args) throws IOException{
             if (args.length <= 0) {
                    System.out.println(
                     "Usage: java PreProcess dir_name"
                    return;
              String dir=null;
              if (args.length >= 1) dir = args[0];
              int indexno=0;
              File directory = new File(dir); 
              File[] files = directory.listFiles();
              FileWriter fstream = new FileWriter("index"+indexno+".txt");
             BufferedWriter out = new BufferedWriter(fstream);
             XPathReaderTest xt=new XPathReaderTest();
              /*for (int index = 0; index < files.length; index++)
                   System.out.println(files[index].toString()); 
              for (int index = 0,i=1; index < files.length; index++)
                   /*if(index/100>indexno){
                        indexno++;
                        out.close();
                        fstream = new FileWriter("index"+indexno+".txt");
                       out = new BufferedWriter(fstream);
                   xt.extract(files[index].toString(),index,i,out);
                   System.gc();
              out.close();
        public void extract(String completepath,int index,int i,BufferedWriter out)
        throws IOException
             System.out.println(index+" "+completepath);
              XPathReader reader = new XPathReader(completepath);
              String separator = File.separator;
              int pos = completepath.lastIndexOf(separator);
              String temp_fname=completepath.substring(0,pos);
              pos=temp_fname.lastIndexOf(separator);
              String f_name= completepath.substring(pos+1);
              i=1;
              while(true)
              String expression = "/file/page["+i+"]/id";
              String id_value= (String) reader.read(expression, XPathConstants.STRING);
              if(id_value=="")
                   break;
              out.write( id_value + ":"+ f_name+ ":"+i+ "\n" );
            i++;
    }Problem:
    This code works fine for xml files < 6MB, but its giving outOfMemory for 6MB and above file.
    I have tried with -Xms256m -Xmx512m option.
    Please suggest the work around , or any modification to code that will resolve my problem.
    I am new to java world , so problem root cause will be very helpful for me.
    Thanks

  • Why the debug arp output the follow imformation "IP ARP throttled out the ARP Request for 10.170.254.13"

    In the network,sometimes,I can't ping some servers,the getway is in the switch 4507,if I connect my computer in the vlan what the servers in,I will not ping the getway successful,and the computer can't learn the getway's MAC.In the same time I debug arp in the 4507,the output is :
    "Jun 20 07:36:21.225: IP ARP throttled out the ARP Request for 10.170.254.46
    Jun 20 07:36:21.225: IP ARP throttled out the ARP Request for 10.170.254.13
    Jun 20 07:36:21.227: IP ARP: sent req src 10.170.252.30 b838.6168.3c7f,
                     dst 10.170.252.82 0000.0000.0000 Vlan252"
    If I reload the 4507,I could ping the getway ,and the servers.
    I think it's ARP attack,the machine who was the question one  is  send a lot of ARP request ,that let the 4507's ARP cache full ,and than overflow. My computer wants to request the getway's MAC ,the message is discard.SO my computer can't ping the getway.
    Can someone tell me, am I right? It's very important for me.
    and tell me ,how can i do ? I'll wait online.
    thank you very very much. 

    Have a look at this document for troubleshooting ARP throttled issues
    http://www.cisco.com/c/en/us/support/docs/ip/express-forwarding-cef/17812-cef-incomp.html
    HTH

  • Use of range in case of XPATH for receiver determination.

    Hi Experts,
    I need to achieve the following using standard receiver determination.
    The material number in the source message structure has to lie within a perticular range and that should decide the receiver of the message.
    For example:
    MT_SRC
    |---- Ele1
    |----
    MaterialNo.
    If MaterialNo is between 100000100 and 100001000 then it should be sent to BS_TGT1 else it should be sent to BS_TGT2.
    Is it possible to achieve this using the standard conditional receiver determination using XPATH and if yes, how exactly?
    Regards,
    Amol

    Hi Amol,
    I think its possible. Never tried though for a range.
    Go through this link and check out what is described under the section "Notes Regarding the Use of XPath Expressions"
    http://help.sap.com/saphelp_nw04/helpdata/en/43/a513f2632c332ce10000000a11466f/frameset.htm
    I am not sure whether it will work for two conditions though, i.e. for a range( Greater than 100000100, less than 100001000).
    Just try and let us know.
    Regards,
    Sanjeev.

Maybe you are looking for

  • Issue with fan or heat in macbook pro

    Issue with fan or heat in macbook pro

  • How to automatically allow blocked plug-in in Internet Explorer

    Hi, I'm using an 'easy rotator' slideshow plug in on the home page of my site i'm building which works fine in chrome but gets blocked when I preview it in Internet Explorer unless i click 'Allow blocked content'. Is there anyway to bypass this block

  • Unable to view PDF attachments from my iPhone.

    I am using service called RightFax this service is send the faxes to clients mailboxs. I have been reported from clients that they are unable to view the attachmentson their iPhones, the attachment format is PDF. The attachment can be openned from an

  • Attachment in WLS 7 sp2 Web Service

    Hi, I'm trying to send to a Web Service in WLS7 sp2 SOAP message with attachments. My problem: when I don't add any attachment to SOAP message all go OK, but when I add an attachment with the "href" attribute in an element of the message (I need do i

  • Accessing the Product Model in PME

    Hi All, I am facing an issue related to PME, I have created a configurable product in CRM. The  issue is when i  clicked on create button in the configuration tab of commpr01 , PME starts and establishes connection with the respective client but it i