Problem with style validation in geoserver - styles

Try to set a style in geoserver styles editor.
but the validation fails
<?xml version="1.0" encoding="UTF-8"?>
<StyledLayerDescriptor version="1.0.0"
xsi:schemaLocation="http://www.opengis.net/sld http://schemas.opengis.net/sld/1.1.0/StyledLayerDescriptor.xsd" xmlns="http://www.opengis.net/sld"
xmlns:ogc="http://www.opengis.net/ogc" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<NamedLayer>
<Name>capitals</Name>
<UserStyle>
<Name>fix_histogram</Name>
<Title>Fix Histogram</Title>
<FeatureTypeStyle>
<Rule>
<Title>Capitals</Title>
<RasterSymbolizer>
<ContrastEnhancement>
<Normalize>
<VendorOption name="algorithm">StretchToMinimumMaximum</VendorOption>
<VendorOption name="minValue">50</VendorOption>
<VendorOption name="maxValue">100</VendorOption>
</Normalize>
</ContrastEnhancement>
</RasterSymbolizer>
</Rule>
</FeatureTypeStyle>
</UserStyle>
</NamedLayer>
</StyledLayerDescriptor>
line 19: cvc-complex-type.2.1: Element 'Normalize' must have no character or element information item [children], because the type's content type is empty.
but this code was taken from the example for RasterSymbolizer:
https://docs.geoserver.org/latest/en/user/styling/sld/reference/rastersymbolizer.html
Thanks,

It is possible that the schema that the editor is using has not been updated to recognise the vendor options you are using.
Does the style work if you apply it?

Related

Programmatically change widget title in IBM Connections

I'am trying to programmatically change a widget title in Connections. I use the following REST end-point:
/communities/service/atom/community/widgets?communityUuid=xyz&widgetInstanceId=xyz
Using the following PUT:
<?xml version="1.0" encoding="UTF-8"?><entry xmlns="http://www.w3.org/2005/Atom" xmlns:snx="http://www.ibm.com/xmlns/prod/sn">
<title type="text">Bestandjes</title>
<category scheme="http://www.ibm.com/xmlns/prod/sn/type" term="widget">
</category>
<snx:widgetDefId>Files</snx:widgetDefId>
<snx:widgetInstanceId>Wfa656aa9103e_41d2_a7fc_44e84d642aa4</snx:widgetInstanceId>
<snx:hidden>false</snx:hidden>
<snx:location>col2</snx:location>
</entry>
With the WidgetInstanceId and communityID as a parameter. After the PUT is being executed, no error did occur but the title stays the same. Any suggestions?
You should be able to get this working by adding the following:
<snx:customTitle>TestChangeBookmarks</snx:customTitle>
i.e.
<?xml version="1.0" encoding="UTF-8"?><entry xmlns="http://www.w3.org/2005/Atom" xmlns:snx="http://www.ibm.com/xmlns/prod/sn">
<title type="text">Bookmarks</title>
<category scheme="http://www.ibm.com/xmlns/prod/sn/type" term="widget">
</category>
<snx:customTitle>TestChangeBookmarks</snx:customTitle>
<snx:widgetInstanceId>W127627423458_49a0_bba1_af9bbf24d395</snx:widgetInstanceId>
<snx:hidden>false</snx:hidden>
<snx:location>col2</snx:location>
</entry>
*Note the element should contain the current title of the widget before making changes.
*Note is ignored for PUT request, therefore it is not needed.
More information on the widget entry elements can be found here:
https://www-10.lotus.com/ldd/lcwiki.nsf/xpAPIViewer.xsp?lookupName=IBM+Connections+5.0+API+Documentation#action=openDocument&res_title=Working_with_community_widgets_ic50&content=apicontent
Updated Community Widget Title

Got a Fatal Error when validating a rdf

I Put the code that is shown below in a rdf vaildator
http://www.w3.org/RDF/Validator/
and got an (FatalError: The entity "xsd" was referenced, but not declared) i am not sure why i got this.
<?xml version="1.0"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:owl ="http://www.w3.org/2002/07/owl#">
<owl:Restriction>
<owl:onProperty rdf:resource="#hasParent" />
<owl:cardinality rdf:datatype="&xsd;nonNegativeInteger">2</owl:cardinality>
</owl:Restriction>
</rdf:RDF>
[I got a] (FatalError: The entity "xsd" was referenced, but not declared) i am not sure why i got this.
In this line:
<owl:cardinality rdf:datatype="&xsd;nonNegativeInteger">2</owl:cardinality>
the entity &xsd;appears. It wasn't defined, though. You could resolve the issue by replacing &xsd; with http://www.w3.org/2001/XMLSchema#. E.g.,
<?xml version="1.0"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:owl ="http://www.w3.org/2002/07/owl#">
<owl:Restriction>
<owl:onProperty rdf:resource="#hasParent" />
<owl:cardinality rdf:datatype="http://www.w3.org/2001/XMLSchema#nonNegativeInteger">2</owl:cardinality>
</owl:Restriction>
</rdf:RDF>
That said, it looks like you copied a snippet from an OWL ontology. The ontology probably had the entity declaration in the origin. Note that the content you have now is no longer a legal OWL ontology because it doesn't have the property declaration for hasParent, and perhaps because there's no base IRI defined. It can be still legal RDF, though.

How do I change the default XML generated for a blank XPage?

The default XML generated when a new XPage is created looks like thi
<?xml version="1.0" encoding="UTF-8"?>
<xp:view xmlns:xp="http://www.ibm.com/xsp/core">
</xp:view>
but when you add new components from the extension library and other palette items the view xsmlns namespace changes. It also reformats code and screws up any JavaScript and or CSS on the page.
How can I change the default XML created to look more like this and therefore cover my bases when I add new components?
<?xml version="1.0" encoding="UTF-8"?>
<xp:view xmlns:xp="http://www.ibm.com/xsp/core"
xmlns:xe="http://www.ibm.com/xsp/coreex"
xmlns:xc="http://www.ibm.com/xsp/custom">
</xp:view>
One possible solution I could come up with would be to create a template in your Eclipse Designer (Preferences > XML > XML Files > Editor > Templates).
Just to test this I created this template:
xmlns:xe="http://www.ibm.com/xsp/coreex"
xmlns:xc="http://www.ibm.com/xsp/custom"
Saved it under the name "myAddNamespace" with context "XML Attribute" and "Automatically insert" = ENABLED.
If then I create a new xpage, I can go into source view, place my cursor at the end of the default namespace before the closing '>', then type "my", hit - and then select my template to be inserted at the cursor position:
I'm aware that this is NOT what you really asked for, but it's at least something
Tested this on 9.0.1 and it automatically formats the way you mention. For example without touching anything I get this.
<?xml version="1.0" encoding="UTF-8"?>
<xp:view xmlns:xp="http://www.ibm.com/xsp/core"
xmlns:xe="http://www.ibm.com/xsp/coreex"
xmlns:xc="http://www.ibm.com/xsp/custom">
<xe:dialog id="dialog1"></xe:dialog>
<xc:test></xc:test>
</xp:view>
You can force a reformat pressing CTRL-SHIFT-F (or right click, source->format). You can modify how the formatting works by selecting "File-Preferences" menu option, then select "XML->XML Files->Editor".
I think what you want is "Split Multiple Attributes each on a new line".

Access 2010 Web Database - Update textbox value from local variable?

How do I change a textbox value to the one I have in a local variable?
I have expression builder and macros - but not the VBA macros as there seems to be no way of having VBA macros on access web forms.
You can use a macro to set the value of a control on a web form to a local variable.
Here is a basic example (Access 2010 macros are written in XML). There are two code blocks - one that sets the local variable, and one that sets the value of the text box.
<?xml version="1.0" encoding="UTF-16" standalone="no"?>
<UserInterfaceMacros xmlns="http://schemas.microsoft.com/office/accessservices/2009/11/application">
<UserInterfaceMacro For="cmdSetTxt2LocVar" Event="OnClick">
<Statements>
<Action Name="SetLocalVar">
<Argument Name="Name">LocVar</Argument>
<Argument Name="Expression">'foo'</Argument>
</Action>
</Statements>
</UserInterfaceMacro>
</UserInterfaceMacros>
And:
<?xml version="1.0" encoding="UTF-16" standalone="no"?>
<UserInterfaceMacros xmlns="http://schemas.microsoft.com/office/accessservices/2009/11/application">
<UserInterfaceMacro For="cmdSetTxt2LocVar" Event="OnClick">
<Statements>
<Action Name="SetProperty">
<Argument Name="ControlName">test</Argument>
<Argument Name="Property">Value</Argument>
<Argument Name="Value">LocVar</Argument>
</Action>
</Statements>
</UserInterfaceMacro>
</UserInterfaceMacros>
For a basic overview of UI macros, watch this video: http://office.microsoft.com/en-us/access-help/video-create-a-user-interface-ui-macro-VA101814109.aspx
For more information about SetProperty, see http://msdn.microsoft.com/en-us/library/ff194340.aspx

ContentType DocumentTemplate not found in a List

I have the following Feature:
<?xml version="1.0" encoding="utf-8"?>
<Feature Id="9A3C5D02-A2EB-4725-97F7-CDA6DE319F1B"
Title="My Custom Types"
Scope="Site"
DefaultResourceFile="core"
Hidden="TRUE"
xmlns="http://schemas.microsoft.com/sharepoint/">
<ElementManifests>
<ElementManifest Location="Elements.xml" />
<ElementFile Location="templates/MeetingMinutes.docx" />
</ElementManifests>
</Feature>
Which contains the following Elements.xml:
<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<Module Name="Templates" Url="_cts/Meeting Minutes" Path="templates" RootWebOnly="TRUE">
<File Url="MeetingMinutes.docx" Type="Ghostable" />
</Module>
<ContentType
ID="0x01010066DD088A6B8B46BCA775CCD119FBB3E8"
Name="Meeting Minutes"
Group="Custom Content Types"
Version="0">
<FieldRefs />
<DocumentTemplate TargetName="MeetingMinutes.docx"/>
</ContentType>
</Elements>
I then use this ContentType within a custom List Template:
<ContentTypes>
<ContentTypeRef ID="0x0101">
<Folder TargetName="Forms/Document" />
</ContentTypeRef>
<ContentTypeRef ID="0x01010066DD088A6B8B46BCA775CCD119FBB3E8">
<Folder TargetName="Forms/Document" />
</ContentTypeRef>
<ContentTypeRef ID="0x0120" />
</ContentTypes>
I deploy the solution, activate the feature, and create an instance of the List Template. I go into the library and select Settings > Document Library Settings > Content Types: Meeting Minutes > Parent: Meeting Minutes > Advanced settings. I'm now in the Advance Settings of the Site Content Type. The URL of the existing document template is MeetingMinutes.docx and there is an (Edit Template) link which points to http://myserver/sites/testsite/_cts/Meeting%20Minutes/MeetingMinutes.docx. Everything's shiny.
But, I hit the back button two times so I'm back in the settings of the List Content Type. This time when I click Advance settings, the URL of the existing document template is still MeetingMinutes.docx, but there is no (Edit Template) link. Troubling.
Pressing on, I go back to AllItems.aspx and click New > Meeting Minutes. As Word is loading, I see a little Opening dialog which says, Opening: http://myserver/sites/testsite/Shared%20Documents/Forms/Document/MeetingMinutes.docx, to which Word responds: "Word was unable to read this document. It may be corrupt."
So the Document Template works correctly in the Site Content Type (where it does me no good), but is not working in the List Content Type (where I really need it). Now, I know I could put this in _layouts, but from what I've read, _cts is the way to do it. What am I doing wrong?
Rich, I'm not exactly sure what's going on because I created a feature using your feature and elements files as you specified and it works correctly for me.
There is one difference though.
When I create a new document in the library from the content type, the template url is
http://myserver/sites/testsite/Shared%20Documents/Forms/Meeting Minutes/MeetingMinutes.docx
Not
http://myserver/sites/testsite/Shared%20Documents/Forms/Document/MeetingMinutes.docx
Somehow your content type seems to be looking in the wrong folder for the template. I hope that gives you some clues.
I had the same exact problem with document template for List Content Type.
What I did is just what SharePoint do when you create your library from web site : duplicate the document template inside the “Forms” folder of the library in a subfolder that have the same name than the content type.
You just need to add a module element somewhere in your project :
<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<Module Name="MeetingMinutesListInstanceTemplate" Url="Shared Documents/Meeting Minutes" Path="templates" RootWebOnly="TRUE">
<File Url="MeetingMinutes.docx" Type="Ghostable" />
</Module>
</Elements>
It worked for me.

Resources