XML attribute not displayed by stylesheet

HI Gentlemen,
I set up a very simple case where some of the input data is in attributes. It works fine for the element content--firstname, however it does not display the attribute requested. What can be wrong? Please help!
Thanks, regards
Miklos
The XML instance (people.xml):
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="c:\XSL\people.xsl"?>
<people>
<person born="1912" died="1948">
<name>
<firstname>Alan</firstname>
</name>
</person>
</people>
The corresponding stylesheet (people.xsl):
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="person">
<person born="{born}" />
</xsl:template>
</xsl:stylesheet>

Are you opening "people.xml" directly in a web browser?
If so, I think you need to transform to HTML for a proper display.
For example :
people.xml
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="file://c:/XSL/people.xsl"?>
<people>
<person born="1912" died="1948">
<name>
<firstname>Alan</firstname>
</name>
</person>
</people>
people.xsl
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="person">
  <html>
   <body>
    <p><xsl:text>First name = </xsl:text><xsl:value-of select="name/firstname"/></p>
    <p><xsl:text>Born = </xsl:text><xsl:value-of select="@born"/></p>
    <p><xsl:text>Died = </xsl:text><xsl:value-of select="@died"/></p>
   </body>
  </html>
</xsl:template>
</xsl:stylesheet>Otherwise, you could use any XSLT processor to perform the transformation.

Similar Messages

  • SSAS Date Dimension attribute not displaying all members when browsed singly

    I have an SSAS Cube database that holds data from 2009 to 2013 (5 years)
    There is a Date Dimension in the database which holds a "Calender Period" Hierarchy with the attributes CalenderYear >> Quarter >> MonthYear >> Day .
    I am connecting to the cube via Microsot EXCEL
    Whenever i try to browse this hierarchy alone in the spread sheet, the first attribute as per the hierarchy shown above i.e. Calender Year does not display all the members, that is confusing the users to assume that the cube is not processed with the latest
    data, which is not the case. However as soon as i try to browse any measure with this dimension, the data automatically shows for the latest dates of 2013 as per the expectations.
    The perspective that is selected while connecting to the Cube in this case is the one that is by default the one including all the Cube Objects.
    Whenever i try to browse the same cube for the same Dimension Hierarchy but in a separate user perspective i get the latest three Calender Years i.e. 2011,2012 and 2013 but not the complete years 2009 to 2013.
    When i was browsing this earlier by the original base perspective (which has all the cube objects visible) the Calender Years displayed were 2009,2010,2011&2012 but not 2013 which should be there.
    I checked the base view in the DB that is used to create this Dimension, that is fetching the complete data for 2009 to 2013.
    I have also verified that this issue is still there if i try to browse the cube from the SSMS.
    Can anyone help me to get all the years from 2009 to 2013 (the years for which my cube has data) become visible as soon as i drop it alone into the Spreadsheet?
    Thanks 
    Suvrat

    Thanks for your response Muthukumaran.
    I did not know about this default measure property of the SSAS cube, it would be nice if you could also tell me how to check which is the default measure for a cube.
    I understand your point that if a particular measure group does not have data for a year then that particular year will be skipped as per the default excel settings, which when disabled allowed all the years to be displayed, but in that case every time the
    users connect to the cube via excel, they will have to configure this property.
    I would like to share the way i resolved this issue:
    I went ahead and simply did a Process Full for the Date dimension. The years started to display by default as per the expectations. Now after observing this change, as per my understanding I believe this issue was due to the CACHE of the cube not being updated
    for the date dimension. As after each incremental load of the DWH we processed the cube & while processing the cube the dimensions were set for a Process Update and the Measure Groups were set for a Process Full. This caused this issue, and we could resolve
    this once the Date Dimension was processed full.
    Thanks
    Suvrat Rai

  • KM Repository images,and XML Forms not displaying.

    Hello All,
    I am currently running NW04 SPS14 Portal with KM & Collaboration.
    However, the icons in the Content Management>> Explorer>> Documents repository are not displaying. Instead a little while box, with a red x sign appears in place of the images.
    When I launch the XML Forms builder, the application doesnt load.
    Also, the content developed using XML forms are no longer displaying, instead I get an error message "<b>Resource cannot be displayed with XML Resource Renderer</b>"
    I will appreciate any suggestion that will help to resolve this problem.
    Thank you.
    Regards,
    Collins.

    Hi Collins
    Have u got any solution to your problem .  Could you please share the solution to this problem
    Thanks
    Prasad

  • Xml forn not displaying

    hi all,
       I have created xml form in one server and import that xml form in another server. the xml form is coming in the etc folder(/etc/xmlforms). but I am not able to create new form. ie. (New/Forms/) . the xml form is not displaying. ( i dont want to generate xml form . when i generate the xml form it is displaying in the New/Forms section )  how to display the xml form in the New/Forms  section without generating it.
    Regards,
    Shanthakumar.

    hey try out this link it may help you
    http://www.judahfrangipane.com/blog/2007/01/01/error-2044-unhandled-ioerrorevent-texterror -2038-file-io-error/
    thanks & regards
    gajanan
    [email protected]

  • URL Policy agent attributes - Not displayed

    I installed a Policy Agent on a remote Web Server and pointed the policy agent to the Identity Server installed alongwith the Portal.
    When I click on the Policy agent in the Identity Server console , it displays the following message
    "There are no attributes to display for this entry".
    How to obtain the attributes for the URL Policy Agent Service .Is this a problem concerning the IS . Can anyone throw light on this issue.
    thanx in advance
    raj

    It's the way it supposed to be. There is no configurable attributes for this service.

  • Xml file not displaying.

    Hello all,
    Pls i am trying to work on an example that displays some pics in form of slide show. Everything worked fine till i got to a point of displaying the content of an xml file. I tried all i could but things did not work out. someone pls help, i am frustrated. Below re my codes.
    test.xml
    <?xml version="1.0"?>
    <wedshow>
    <audio source="devpics/mus.mp3 />
    <photo duration="10" source="devpics/test.jpg" />
    <photo duration="20" source="devpics/tes.jpg" />
    <photo duration="20" source="devpics/testA.jpg" />
    </wedshow>
    WedShowPlayer2.mxml
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:MyComp="*" layout="absolute" initialize="init();">
    <mx:Script>
    <![CDATA[
    import mx.rpc.events.ResultEvent;
    private function init():void {
    service.send();
    ]]>
    </mx:Script>
    <mx:HTTPService id="service" url="component/test.xml" resultFormat="e4x" result="show.loadShow(
    XML(event.result) ); show.playShow();" />
    <MyComp:WedShow id="show" width="100%" height="100%" horizontalCenter="0"/>
    </mx:Application>
    WedShow.mxml
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" horizontalScrollPolicy="off" verticalScrollPolicy="off">
    <mx:Script>
    <![CDATA[
    import mx.collections.ArrayCollection;
    import flash.display.Loader;
    [Bindable]
    private var _xml:XML;
    private var photos:ArrayCollection = new ArrayCollection();
    private var sound:Sound;
    private var iLoaded:uint = 1;
    private var isLoaded:Boolean = false;
    private var timer:Timer = new Timer(1000,0);
    private var photoIndex:int = 0;
    private var nextPhotoTime:int = 1;
    public function playShow():void {
    if(isLoaded) {
    play.visible = false;
    timer = new Timer(1000,0);
    timer.addEventListener( TimerEvent.TIMER, onTime );
    timer.start();
    if(sound!=null) {sound.play();}
    } else { loadShow( _xml ); }
    private function onTime( event:TimerEvent ):void {
    if( event.currentTarget.currentCount == nextPhotoTime ) {
    if( photos.length > photoIndex ) {
    image.load(Loader(photos[photoIndex]).content);
    // using e4x to access the photo duration attribute
    nextPhotoTime += int(_xml.photo[photoIndex].@duration);
    photoIndex++;
    } else {
    stopShow();
    public function stopShow():void {
    timer.stop();
    timer.reset();
    image.source="";
    SoundMixer.stopAll();
    photoIndex = 0;
    nextPhotoTime = 1;
    play.visible = true;
    public function loadShow( xml:XML ):void {
    _xml = xml;
    photos = new ArrayCollection();
    iLoaded = 1;
    isLoaded = false;
    photoIndex = 0;
    nextPhotoTime = 1;
    progress.visible = true;
    play.visible = false;
    for each(var photoNode:XML in _xml.photo) {
    var photo:Loader = new Loader();
    photo.load(new URLRequest(photoNode.@source));
    photo.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS,
    onProgress);
    photo.contentLoaderInfo.addEventListener(Event.COMPLETE,
    onComplete);
    photos.addItem(photo);
    progress.label="Loading Image " + iLoaded +" of " + photos.length + ".";
    private function onProgress( event:ProgressEvent ):void {
    var loaded:Number = 0;
    var total:Number = 0;
    if(iLoaded<photos.length) {
    for each(var item:Loader in photos) {
    loaded += item.contentLoaderInfo.bytesLoaded;
    total += item.contentLoaderInfo.bytesTotal;
    } else {
    loaded = event.bytesLoaded;
    total = event.bytesTotal;
    progress.setProgress(loaded,total);
    private function onComplete( event:Event ):void {
    if(iLoaded<photos.length) {
    iLoaded++;
    progress.label="Loading Image " + iLoaded + "of" +
    photos.length;
    } else if (sound==null && _xml.audio[0].@source!="") {
    sound = new Sound();
    sound.addEventListener(ProgressEvent.PROGRESS, onProgress);
    sound.addEventListener(Event.COMPLETE, onComplete);
    sound.load(new URLRequest(_xml.audio[0].@source));
    progress.label="Loading Audio";
    } else {
    progress.visible = false;
    play.visible = true;
    isLoaded = true;
    ]]>
    </mx:Script>
    <mx:LinkButton id="play" label="Play" horizontalCenter="0" verticalCenter="0" visible="false" color="0xFFFFFF" />
    <mx:ProgressBar id="progress" mode="manual" width="60%" horizontalCenter="0" verticalCenter="0" color="0xFFFFFF" />
    <mx:Image id="image" horizontalCenter="0" verticalCenter="0"/>
    </mx:Canvas>
    anyone pls help
    thanks in anticipation
    [email protected]

    hey try out this link it may help you
    http://www.judahfrangipane.com/blog/2007/01/01/error-2044-unhandled-ioerrorevent-texterror -2038-file-io-error/
    thanks & regards
    gajanan
    [email protected]

  • Some XML customizing not displayed correctly in graphic in PDF form

    Hello,
    we have following problem: We want to create a read-only PDF with an integrated graphic with analytical data.
    The PDF form is created with SFP. Data is extracted and the graphic rendered with the class CL_IGS_CHART_ENGINE.
    We used SAP chart designer and transformed the XML into our string.
    The graphic is displayed in our PDF, but some customizing settings in our XML are neglected, especially the font type, her only courier is displayed. Also some manual positions of legends don't work.
    When I display the chart in the SAP GUI using cl_gui_chart_engine everything works fine, so  I assume that the XML and the  transformation is correct.
    So where is the problem: Mime type? codepage? printing job?
    Thanks and Regards
    Andreas

    Hello,
    I would like to know what type of scenario do you use. Is that WD form? Or offline form?
    Based on the type, you may find your solution here:
    When you need to send a picture into the offline form: another image question - using Regular ABAP not web dynpro and Display a logo dynamically in adobe form
    For the WD form: /people/bhawanidutt.dabral/blog/2007/11/15/how-to133-integrate-adobe-form-on-webdynpro-for-abap-and-deploy-it-on-portal
    What MIME type (picture type) has your generated picture? JPG for example is ok, but for exotic types please check in your LCD (place Image on the layout and open the dialog for picture assignment, you can see the allowed picture types in there).
    Regards, Otto
    p.s.: What is the mentioned XML customizing? XML is the form of the femplate, but I have never customized anything IN THERE. Did you change the XML source manually? Or what type of changes are not managed correctly?

  • Xml page not displayed

    Hi,I amfacing problem in B2B(HTTP-IDOC)scenario.the problem is we posted PO through XI to vendor .XI processed successfylly. but here the probelm is , in SXMB_MONI in the place Response i am getting below message PAGE CANNOT BE DISPLAYED. but my peer geeting correctly . he is in US. i am in india. Actually  i dont have access to internet. Is this reason?or my machine problem or any other reason.?
    <b>The XML page cannot be displayed
    Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later.
    Access is denied. Error processing resource 'http://xml.cxml.org/schemas/cXML/1.2.011/cXML.dtd'.
    </b>

    Hay Reddy,
    I came across this error on two occasions, in one it was an internet explorer issuse (XI is using the IE for the display) once i upgraded the internet explorer the problem wa solved.
    the second time was when my payload was not a legitimate XML syntaxso it wouldn't display it.
    check out for both these errors.
    have a good one,
    Uri.

  • Transient bool VO attribute not displaying correctly in table on data fetch

    Hello Forum,
    I have a 'select all' button that programmatically sets a boolean transient attribute on a view object to 'true'. The code to iterate through all the rows in the VO is in a ViewObjectImpl subclass and looks like this:
        public int setAllRowsSelected(String attrDenotingSelection){
            RowSetIterator tempRSI = this.createRowSetIterator(null);
            tempRSI.reset();
            int count = 0;
            while(tempRSI.hasNext()){
                Row row = tempRSI.next();
                row.setAttribute(attrDenotingSelection, true);
                count++;
            tempRSI.closeRowSetIterator();
            return count;
        }The VOimpl method is invoked via an actionListener from a managed bean:
        public void rowSelectForBulkAction(ValueChangeEvent valueChangeEvent) {
            if (!PhaseId.INVOKE_APPLICATION.equals(valueChangeEvent.getPhaseId())) {
                valueChangeEvent.setPhaseId(PhaseId.INVOKE_APPLICATION);
                valueChangeEvent.queue();
            } else {
                String attrNameDenotingSelection =
                    (String)valueChangeEvent.getComponent().getAttributes().get("attrDenotingSelection");
                ArrayList params = new ArrayList();
                params.add(attrNameDenotingSelection);
                JUCtrlActionBinding actionBinding = (JUCtrlActionBinding)EL.get("#{bindings.getCountOfSelectedRows}");
                actionBinding.setParams(params);
                Integer count = (Integer)actionBinding.execute();
                if (!actionBinding.getErrors().isEmpty()) {
                    throw new RuntimeException("Error occured in \'getCountOfSelectedRows\' binding method. Investigate back end to find source of error.");
                EL.set("#{viewScope.countOfSelectedRows}", count);
        }The VOImple method is exposed for the bean to call it.
    The returned 'count' is used determine whether other UI controls should be enabled.
    The code works fine -- all rows have the attribute set to 'true', but the problem I have is when the table is scrolled and the next 25 (or whatever the rangesize is) is fetched for the table, the selectBooleanCheckbox component is not checked. The first 25 or so are checked (i.e., true), but the others aren't.
    The only way I can seem to get all selectBooleanCheckbox components to show as checked is if I set the range to a large number that will hopefully exceed the greatest number of rows ever.
    This seems wrong.
    Is this a bug or is there some setting I am missing in order to get the selectBooleanCheckbox to display correctly?

    In stead of custom method in VO try custom method in AM along following lines
    this.getVO().setRangeSize(-1);
    Row [] rows = getVO().getAllRowsInRange();
    loop through rows setting the transient attribute.
    Anyway setting rangeSize to -1 will force all records to be retrieve.
    HTH
    Kenneth

  • JSTL unicode xml does not display after x:parse call

    I am trying to display an xml file on the web using JSTL xml tags. The file is encoded in utf-8 containing ancient Greek characters (x1f92, etc.). The file displays properly from a servlet + xslt (http://163.1.169.41/testapp), but I want to use JSTL.
    The JSTL produces intricate spaghetti on the screen (e.g. ��������������� ). I have seen this before --it would seem that unicode is indeed being directed at the screen but is not being interpreted properly. (Not strings of question marks mind you; the unicode seems to be there in this case).
    The code producing the spaghetti is below. I am just dumping in on the screen for now and will use xpath calls later for more precise extraction.
    Does the JSTL want character entities for the x arse call? I would not think so: parsing a utf-8 file would be a very common operation. How can I get the xml unicode file to display properly using the JSTL below?
    [headers]
    <%@ page contentType="text/html; charset=utf-8"pageEncoding="utf-8" %>
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
    <%@ taglib prefix="x" uri="http://java.sun.com/jsp/jstl/xml" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <c:import var="papyrus" url="blabula.xml" />
    <x:parse var="doc" xml="${papyrus}" />
    <x:out select="$doc" />
    ....

    Is it the parse or the import tag that is at fault?
    Try just printing the results of the <c:import> and see what it produces.
    you might try <c:import var="papyrus" url="blabula.xml" charEncoding="utf-8" />

  • Help needed - XML forms not displaying in my repository

    Hi all
    I could really do with some help here.  I have a custom XML form for news articles.  It works fine in the standard documents repository, but I have my iView pointing to a folder in my own CM repository.
    When a user tries to directly access the "show" form, instead of the form it displays the XML code.  Any ideas why this is?
    My CM repository is running the following services:
    layout, properties, svc_acl, tbp
    EP6SP14
    Thanks!  Chris

    Hello,
    I have the same problem. When I'm trying to create an XML file using XML form in the repository /etc, I get the following error:
    XML - Forms 
    Cannot create item e0977870-cf29-2d10-bb89-d00b5761268c.xml in collection /etc/public/; operation is not supported.
    When I do the same in repository /documents, it works fine.
    I think, I've made the neccesary settings for the repository (Form Based Publishing, ...).
    Any clues will be highly appreciated.
    Jiri

  • XML data not displayed with XSL

    I have just started learning XML so bear with me. I have a xml document that I created and want to use a stylesheet to display it in html but it doesn't seem to be working. Here is the xml file:
    <?xml version="1.0" encoding="UTF-8"?>
    <?xml-stylesheet href="XSL\myXSL.xsl" type="text/xsl"?>
    <GstBk:Book xmlns:GstBk="http://www.testurl.com">
    <GstBk:Guest>
    <GstBk:Address>
    <GstBk:Name>John Doe</GstBk:Name><GstBk:From>Anywhere USA</GstBk:From>
    </GstBk:Address>
    </GstBk:Guest>
    </GstBk:Book>
    And here is the xsl document:
    <?xml version="1.0"?>
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:GstBk="http://www.testurl.com"
    version="1.0"
    >
    <xsl:template match="GstBk:Book">
    <html>
    <head>
    <title>Guest Book</title>
    </head>
    <body>
    <xsl:apply-templates />
    </body>
    </html>
    </xsl:template>
    <xsl:template match="GstBk:Guest">
    Name = <xsl:value-of select="GstBk:Name" />
    </xsl:template>
    </xsl:stylesheet>
    But the only data I get on the browser is:
    Name =
    Can anyone see something wrong with my files? I have downloaded examples from the net and they seem to work. I even compared them to my files and can't see anything obviously different. Any ideas?
    Thanks

    <?xml version="1.0"?>
    <xsl:stylesheet version="1.0"
                    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                    xmlns:GstBk="http://www.testurl.com">
       <xsl:template match="GstBk:Book">
          <html>
             <head>
                <title>Guest Book</title>
             </head>
             <body>
                <xsl:apply-templates />
             </body>
          </html>
       </xsl:template>
       <xsl:template match="GstBk:Guest">
          Name = <xsl:value-of select="GstBk:Address/GstBk:Name" />
       </xsl:template>
    </xsl:stylesheet>This style sheet with the xml you provided works for me. I use Xalan 2.1.0 for the transformation with the command line: java org.apache.xalan.xslt.Process -in your.xml -xsl your.xsl
    and I get this for the output:
    <html xmlns:GstBk="http://www.testurl.com">
    <head>
    <META http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>Guest Book</title>
    </head>
    <body>
          Name = John Doe
    </body>
    </html>If you still see a different result, let me know what your environment is.

  • Dynamically created "alt" attribute not displaying

    Hi, I have created a details page for our company product, which is diplayed dynamically. I have on this page a dynamic image as well thats pulled from my database. As with any image on the web, I want to set the alt attribute, but of course this has to be dynamic as well. I have done this it seems, as I view my source code from a browser, I can see that the alt has a value there and that it is the correct value. My question is, why doesnt this display when I mouse over the image? Is there something I am forgetting to add? Is this attribute deprecated? here is my code for the alt cfoutput:
    function(){return A.apply(null,[this].concat($A(arguments)))}
    <cfoutput>
              <table align="center">
                <tr>
                  <td><cfif rsDetails.image1 NEQ "">
                      <a href="images/#rsDetails.image1#" target="_blank"><img src="images/#rsDetails.image1#" alt="#rsDetails.item#" /></a>
                    </cfif></td>
                </tr>
              </table>
            </cfoutput>
    Here is the source code from the browser that shows there is an alt value:
    function(){return A.apply(null,[this].concat($A(arguments)))}
    <table align="center">
        <tr>
           <td>
             <a href="images/60K19DL.jpg" target="_blank"><img src="images/60K19DL.jpg" alt="60K19/DL" /></a>
           </td>
        </tr>
    </table>
    I hope this is easy to understand without going into lengthy detail. Thanks for any help!

    Ok I understand what you're saying now. lol I did try my code without the <a> tag but still didn't work. SO thats kinda weird.
    However, until you pointed it out, I didn't realize his site didn't have the mouse tips in firefox or that other browsers didn't support it, so I guess its not that important after all...the tips I mean.
    I hate IE too! but unfortunately when dealing with an online wholesale site, I must use and develop for IE.
    Anyway, thanks for the help! I may try the title attribute, but I think as long as I have the alt for SEO then I am fine.

  • UME Attributes not displaying

    Hi,
    I have followed the <a href="https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/bce8dfbb-0d01-0010-15b0-97e20b8aed96">Extending the User Attributes</a>. We have a LDAP backend thru which we get the user attributes. But we are facing a problem where the user attributes are not showing up in the Portal Business Card. (The popup we see when we click on the user display name in portal). We are using the same namespace as we have mentioned in our UME-LDAP Config file.
    What could be wrong???
    Regards
    BP

    Hi
    Open your info object and goto attributes tab
    select the attribute and goto delete button at bottom to delete.
    It should be fine.Otherwise check the authorisations.
    Also make sure that master data is deleted before deleting attributes.
    Regards,
    Chandu.
    Edited by: Chandu on Oct 15, 2008 1:06 PM

  • XML data not displayed on external applications (Adobe, PowerPoint, Word)

    Hi,
    I have imported an XML file into Xcelsius using the XML data connection button in Xcelsius 2008 SP1.
    I would like to test whether the model is correctly picking up the data when XML file is updated.
    The XML file is stored locally on my PC.
    I'm able to view and refresh the data in Preview mode and in the .SWF file but when exporting to Adobe, PowerPoint or Word, I get #2148 error on opening.
    I did add the path to the swf file and xml file in the Flash Player security settings with no success.
    Any suggestions welcome
    Best regards,
    Jenni Jacob

    Hi Jenni,
    Adobe PDF usually works because like Xcelsius it allows the SWF to load data from anywhere so I am not sure why that one would not work...
    When you export to PowerPoint or Word that probably counts as a different SWF so try adding the folder where the PPT/DOC lives as trusted instead.
    When I am in a VM I tend to add C:\ folder as trusted (meaning I can run a SWF anywhere on my C drive in the VM with trusted permissions).
    Regards,
    Matt

Maybe you are looking for