小编Lax*_*ala的帖子

XML中的嵌套注释?

这些嵌套注释是否允许在XML文件中?

<!-- Making only one observation attempting to correct the error code -->
<!-- <component>
       <!-- Result observation template -->
            <!-- <id root="2.16.840.1.113883.19.5.10" extension="103220"/>
     </component> -->
Run Code Online (Sandbox Code Playgroud)

xml comments

60
推荐指数
4
解决办法
3万
查看次数

处理XSLT函数中的空序列

我有一个XSLT函数,它检查发送的参数是否是YYYYMMDD格式.在某些情况下,我没有获得该函数的任何值,在这些条件下,SAXON抛出的误差低于此值

"不允许空序列作为cda的第一个参数:isValidDate()"

有什么建议如何处理这种情况?

xml xslt

10
推荐指数
1
解决办法
1万
查看次数

处理hibernate UnsupportedOperationException:无法写入只读对象

我需要设置哪些配置参数或会话首选项才能解决此问题?无法写入只读对象?以下是stacktrace以获取更多信息:

Caused by: java.lang.UnsupportedOperationException: Can't write to a readonly object
        at org.hibernate.cache.ReadOnlyCache.lock(ReadOnlyCache.java:43)
        at org.hibernate.action.EntityUpdateAction.execute(EntityUpdateAction.java:85)
        at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:248)
        at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:232)
        at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:140)
        at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:298)
        at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
        at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000)
        at com.mycompany.arch.submission.registry.bean.RegSubmissionSpringService.perform_flush(RegSubmissionSpringService.java:1108)
        at com.mycompany.arch.submission.registry.bean.RegSubmissionSpringService.saveRegistryData(RegSubmissionSpringService.java:1062)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
        at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
        at $Proxy145.saveRegistryData(Unknown Source)
        at com.mycompany.arch.submission.registry.bean.RegDataAccessManager.persistRegistry(RegDataAccessManager.java:54)
Run Code Online (Sandbox Code Playgroud)

java hibernate

9
推荐指数
2
解决办法
8261
查看次数

如何将节点(any)发送到xsl:function?

我可以将节点发送到XSLT函数吗?例如:

<books>
  <book>
    <author>a1</author>
    <price>10</price>
    <year>2009</year>
  </book>
  <!-- ... -->
</books>
Run Code Online (Sandbox Code Playgroud)

我可以将<book>元素发送到函数 - 在该函数中我想处理book(<author>,<price><year>)下的节点

我可以创建一个xsl:function如下所示?

 <xsl:function name="util:checkNode" as="xs:boolean">
      <!-- I would like to know xml schema data type for the param -->
       <xsl:param name="nodeP" as="****"/>
  </xsl:function


          If yes, what xsl schema type to the param ? 
Run Code Online (Sandbox Code Playgroud)

看起来我通过说函数而不是xsl来创建很多混乱:函数---- :(

xml xslt

6
推荐指数
1
解决办法
6759
查看次数

使用XSLT将一个字符串模式转换为另一个字符串模式

我有我的源XML,如下所示

<contents>
  <content>AuthorInformation</content>
  <content>PersonInformation</content>
  <content>PersonPersonalInformation</content>
  <content>GurdianDetails</content>
</contents>
Run Code Online (Sandbox Code Playgroud)

我想将上面的XML转换成

<contents>
  <content>Author Information</content>
  <content>Person Information</content>
  <content>Person Personal Information</content>
  <content>Gurdian Details</content>
</contents>
Run Code Online (Sandbox Code Playgroud)

在源xml文件中的任何地方,内容元素数据都有大写字母,我想在其间添加空格.我可以使用XSLT 2.0示例如何实现这一目标.

xml xslt xpath

5
推荐指数
1
解决办法
185
查看次数

xpath表达式,用于根据父属性选择子节点

<module>
<component>
   <section>
      <ptemplateId root="1.8"/>
      <entry>
    <observation>
       <templateId root="1.24"/>
    </observation>
      </entry>
   </section>
</component>
<component>
   <section>
      <ptemplateId root="1.10"/>
      <entry>
    <observation>
       <templateId root="1.24"/>
    </observation>
      </entry>
   </section>
</component>
<component>
   <section>
      <ptemplateId root="1.23"/>
      <entry>
    <observation>
       <templateId root="1.24"/>
    </observation>
     <entryRelation>
        <observation>
         <templateId root="1.24"/>
        </observation>
     </entryRelation>
      </entry>
   </section>
</component>
<component>
       <section>
          <ptemplateId root="1.8"/>
          <entry>
        <observation>
           <templateId root="1.24"/>
        </observation>
         <entryRelation>
            <observation>
             <templateId root="1.28"/>
            </observation>
         </entryRelation>
          </entry>
       </section>
    </component>
</module>
Run Code Online (Sandbox Code Playgroud)

我想在基于ptemplateId的模板中选择观察,我能知道匹配表达式吗?

<xsl:template match"******">
   <!-- some processing goes here to process
        observation if ptemplateId is 1.8... -->
</xsl:template>

<xsl:template …
Run Code Online (Sandbox Code Playgroud)

xml xslt xpath

3
推荐指数
1
解决办法
1万
查看次数

基于正则表达式的 splunk 查询计数

我的示例日志如下所示

fixed message: 443-343-234-event-put
fixed message: wre-sdfsdf-234-event-keep-alive
fixed message: dg34-343-234-event-auth_revoked
fixed message: qqqq-sdf-234-event-put
fixed message: wre-r323-234-event-keep-alive
fixed message: we33-343-234-event-auth_revoked
Run Code Online (Sandbox Code Playgroud)

日志模式是"fixed message: {UUID}-{event-type}"

我想捕获总共有多少事件;其中有多少是 event-put、event-keep-alive 和 event-auth_revoked

我可以使用 splunk 查询来捕获上述需求吗?

regex logging splunk

3
推荐指数
1
解决办法
4161
查看次数

JPA是否仅引用RDBMS

JPA是关于数据持久性的; 数据持久性仅限于RDBMS吗?如果不是所有不同的持久性机制(如Excel,文件系统,XML,非RDMS等),我们可以用JPA规范实现吗?

java jpa

2
推荐指数
2
解决办法
1540
查看次数

Scala列表与索引信息的区别

我有两个列表

val l1 =清单(1,2,3)

val l2 =清单(1,3,3)

l1.diff(L2)

我可以在列表中找到差异; 同时我对索引感兴趣也发现差异; 我可以知道scala中的解决方案是什么?

注意:所有时间列表大小都是相同的.

scala scala-collections

1
推荐指数
1
解决办法
331
查看次数

标签 统计

xml ×5

xslt ×4

java ×2

xpath ×2

comments ×1

hibernate ×1

jpa ×1

logging ×1

regex ×1

scala ×1

scala-collections ×1

splunk ×1