xslt

Using tokenize within a stylesheet used in a browser

十年热恋 提交于 2021-02-08 08:32:30
问题 I'm trying to assign a variable a certain token from a large string. I first tokenize the string, then for each token I check if it contains a certain substring. If it does, I want to assign that token to the variable. Lastly, I use that variable to set an attribute of a div. I've tried this code below, which gives me the exact output i want in oXygen XML Editor . However, when I run the XML/XSLT file in IE (11), it simply just prints out the entire original string, meaing xhtmlVar in the

Using tokenize within a stylesheet used in a browser

跟風遠走 提交于 2021-02-08 08:32:05
问题 I'm trying to assign a variable a certain token from a large string. I first tokenize the string, then for each token I check if it contains a certain substring. If it does, I want to assign that token to the variable. Lastly, I use that variable to set an attribute of a div. I've tried this code below, which gives me the exact output i want in oXygen XML Editor . However, when I run the XML/XSLT file in IE (11), it simply just prints out the entire original string, meaing xhtmlVar in the

XSLT, transformation between RDF and XML

烂漫一生 提交于 2021-02-08 05:08:12
问题 I have this file in .rdf <rdf:RDF xmlns:vitro-public="http://vitro.mannlib.cornell.edu/ns/vitro/public#" xmlns:c4o="http://purl.org/spar/c4o/" xmlns:ero="http://purl.obolibrary.org/obo/" xmlns:pvs="http://vivoweb.org/ontology/provenance-support#" xmlns:owl2="http://www.w3.org/2006/12/owl2-xml#" xmlns:scirr="http://vivoweb.org/ontology/scientific-research-resource#" xmlns:vivo="http://vivoweb.org/ontology/core#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:bibo="http://purl

XSLT transform removes HTML elements from mixed-content

前提是你 提交于 2021-02-07 19:42:09
问题 Is it possible for XSLT preserve anchors and other embedded HTML tags within XML? Background: I am trying to convert an HTML document into XML with an XSL stylesheet using XSLT. The original HTML document had content interspersed with anchor tags (e.g. Some hyperlinks here and there). I've copied that content into my XML, but the XSLT output lacks anchor tags. Example XML: <?xml version="1.0" ?> <observations> <observation><a href="http://jwz.org">Hyperlinks</a> disappear.</observation> <

Manage includes in XSL

∥☆過路亽.° 提交于 2021-02-07 18:12:46
问题 I have a code generating XSL that includes several XSL files. The files are included in order to call templates. There can be the case when one of the files that I need to include does not exist in my file. I could create a dummy file with the same name and an empty template when the original file is missing but I would get a duplicate error when the original file exists. Bellow is an example: <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org

Difference between XML 1.0 and XML 2.0

自闭症网瘾萝莉.ら 提交于 2021-02-07 13:23:37
问题 What is the difference between XML 1.0 and XML 2.0? 回答1: There has never been an XML 2.0, even as a draft. There is a not entirely popular XML 1.1 standard which has three main changes, the most important of which was somewhat controversially applied in-place to XML 1.0 in XML 1.0 5th edition. It changes the set of allowed element and attribute names (essentially XML 1.0 had a fixed set of names and new characters added to Unicode were not allowed in names; XML 1.1 changed that to an open set

Difference between XML 1.0 and XML 2.0

不羁岁月 提交于 2021-02-07 13:22:52
问题 What is the difference between XML 1.0 and XML 2.0? 回答1: There has never been an XML 2.0, even as a draft. There is a not entirely popular XML 1.1 standard which has three main changes, the most important of which was somewhat controversially applied in-place to XML 1.0 in XML 1.0 5th edition. It changes the set of allowed element and attribute names (essentially XML 1.0 had a fixed set of names and new characters added to Unicode were not allowed in names; XML 1.1 changed that to an open set

Inserting most downloaded items into XMLUI (DSpace 6.2)

一世执手 提交于 2021-02-07 08:31:29
问题 I am using XMLUI (Mirage) on DSpace 6.2 and am trying to insert the "Most Downloaded Items" into the home page. I have figured out the SOLR query for this, namely (in page-structure.xsl): <xsl:variable name="statsURL"> <xsl:text>http://localhost/solr/statistics</xsl:text> </xsl:variable> <xsl:apply-templates select="document(concat($statsURL,'/select?q=type:0+-isBot:true+statistics_type:view&wt=xml&indent=true&facet=true&facet.field=id&facet.sort=count&facet.limit=10'))" mode="mostdownloaded"

How to run saxon xslt transformation in java

十年热恋 提交于 2021-02-07 06:34:27
问题 I can easily run the following in command line to transform an xml file: java -jar saxon9he.jar -o:outputfile.xml data.xml transform.xslt I would like to do the exact same results from within a java file so I can use it in part of a program I'm making. I have put the saxon9he.jar in the build path but how can I call that same command outside the commandline? 回答1: The documentation is here: http://www.saxonica.com/documentation/index.html#!using-xsl/embedding Saxon offers two APIs for running

XML & XSD validation failed: Element has both a 'type' attribute and a 'anonymous type' child

牧云@^-^@ 提交于 2021-02-07 05:15:23
问题 I have an XML file and an XSD file to validate. When i validate , it shows following error. org.xml.sax.SAXParseException: src-element.3: Element 'UC4' has both a 'type' attribute and a 'anonymous type' child. Only one of these is allowed for an element. XML File: <UC4Execution> <Script>JOB_NAME</Script> <UC4 Server="UC4.com" Client="123" UserId="123" Password="*****" > </UC4 > </UC4Execution> XSD File : <xs:element name="UC4Execution"> <xs:complexType> <xs:sequence> <xs:element name="Script"